We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fc42c4c commit 85978dcCopy full SHA for 85978dc
1 file changed
lua/fzf-lua/providers/buffers.lua
@@ -592,10 +592,10 @@ M.treesitter = function(opts)
592
for _, definition in ipairs(get(bufnr0)) do
593
local nodes = get_local_nodes(definition)
594
for _, node in ipairs(nodes) do
595
- if node.node then
+ node.kind = node.kind and node.kind:gsub(".*%.", "")
596
+ if node.node and (not opts.node_filter or opts.node_filter(node, node.kind)) then
597
vim.schedule(function()
598
-- Remove node prefix, e.g. `locals.definition.var`
- node.kind = node.kind and node.kind:gsub(".*%.", "")
599
local lnum, col, _, _ = ts.get_node_range(node.node)
600
local node_text = ts.get_node_text(node.node, bufnr0)
601
local node_kind = node.kind and utils.ansi_from_hl(kind2hl(node.kind), node.kind)
0 commit comments