feat(picker): added treesitter symbols picker

This commit is contained in:
Folke Lemaitre 2025-02-07 21:51:58 +01:00
parent fcd190307b
commit a6beb0f280
No known key found for this signature in database
GPG key ID: 41F8B1FBACAE2040
2 changed files with 214 additions and 0 deletions

View file

@ -769,6 +769,29 @@ M.spelling = {
confirm = "item_action",
}
---@class snacks.picker.treesitter.Config: snacks.picker.Config
---@field filter table<string, string[]|boolean>? symbol kind filter
M.treesitter = {
finder = "treesitter_symbols",
format = "lsp_symbol",
filter = {
default = {
"Class",
"Enum",
"Field",
"Function",
"Method",
"Module",
"Namespace",
"Struct",
"Trait",
},
-- set to `true` to include all symbols
markdown = true,
help = true,
},
}
---@class snacks.picker.undo.Config: snacks.picker.Config
---@field diff? vim.diff.Opts
M.undo = {