fix(fzf): symbols filter

This commit is contained in:
Folke Lemaitre 2024-06-11 16:11:45 +02:00
parent 056042b221
commit 7e0ac6850b
No known key found for this signature in database
GPG key ID: 41F8B1FBACAE2040

View file

@ -16,7 +16,12 @@ LazyVim.pick._open = function(command, opts)
end
local function symbols_filter(entry, ctx)
ctx.symbols_filter = ctx.symbols_filter or require("lazyvim.config").get_kind_filter(ctx.bufnr)
if ctx.symbols_filter == nil then
ctx.symbols_filter = require("lazyvim.config").get_kind_filter(ctx.bufnr) or false
end
if ctx.symbols_filter == false then
return true
end
return vim.tbl_contains(ctx.symbols_filter, entry.kind)
end