Skip to content

Custom scanner #422

Answered by wincent
idr4n asked this question in Q&A
Apr 3, 2024 · 2 comments · 2 replies
Discussion options

You must be logged in to vote

Then how can I use the custom "own" finder?

I think you've found a gap in the docs; or at least, the reference to custom finders is perhaps not obvious enough... I have an example of how to do this in my dotfiles:

local has_commandt, commandt = pcall(require, 'wincent.commandt')
if has_commandt then
  commandt.setup({
    -- Demo: showing how to set up arbitrary command scanner that runs
    -- `ack -f --print0`. See accompanying `:CommandTAck` definition below.
    finders = {
      ack = {
        command = function(directory)
          pushd(directory)
          local command = 'ack -f --print0'
          local drop = 0
          return command, drop
        end,
        max_files = 1…

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
2 replies
@wincent
Comment options

@idr4n
Comment options

Answer selected by idr4n
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants