feat: add prefiltering to treesitter picker (#879)
This commit is contained in:
@@ -470,6 +470,9 @@ builtin.file_browser({opts}) *builtin.file_browser()*
|
|||||||
|
|
||||||
builtin.treesitter() *builtin.treesitter()*
|
builtin.treesitter() *builtin.treesitter()*
|
||||||
Lists function names, variables, and other symbols from treesitter queries
|
Lists function names, variables, and other symbols from treesitter queries
|
||||||
|
- Default keymaps:
|
||||||
|
- `<C-l>`: show autocompletion menu to prefilter your query by kind of ts
|
||||||
|
node you want to see (i.e. `:var:`)
|
||||||
|
|
||||||
|
|
||||||
Fields: ~
|
Fields: ~
|
||||||
|
|||||||
@@ -348,7 +348,10 @@ files.treesitter = function(opts)
|
|||||||
entry_maker = opts.entry_maker or make_entry.gen_from_treesitter(opts)
|
entry_maker = opts.entry_maker or make_entry.gen_from_treesitter(opts)
|
||||||
},
|
},
|
||||||
previewer = conf.grep_previewer(opts),
|
previewer = conf.grep_previewer(opts),
|
||||||
sorter = conf.generic_sorter(opts),
|
sorter = conf.prefilter_sorter{
|
||||||
|
tag = "kind",
|
||||||
|
sorter = conf.generic_sorter(opts)
|
||||||
|
}
|
||||||
}):find()
|
}):find()
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -73,6 +73,8 @@ builtin.fd = builtin.find_files
|
|||||||
builtin.file_browser = require('telescope.builtin.files').file_browser
|
builtin.file_browser = require('telescope.builtin.files').file_browser
|
||||||
|
|
||||||
--- Lists function names, variables, and other symbols from treesitter queries
|
--- Lists function names, variables, and other symbols from treesitter queries
|
||||||
|
--- - Default keymaps:
|
||||||
|
--- - `<C-l>`: show autocompletion menu to prefilter your query by kind of ts node you want to see (i.e. `:var:`)
|
||||||
---@field show_line boolean: if true, shows the row:column that the result is found at (default is true)
|
---@field show_line boolean: if true, shows the row:column that the result is found at (default is true)
|
||||||
builtin.treesitter = require('telescope.builtin.files').treesitter
|
builtin.treesitter = require('telescope.builtin.files').treesitter
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user