1
0
Fork 0
neovim-config/lua/plugins/treesitter.lua

99 lines
1.9 KiB
Lua
Raw Normal View History

2024-09-19 12:58:41 -03:00
return {
{
"nvim-treesitter/nvim-treesitter",
lazy = false,
config = function()
require("nvim-treesitter.configs").setup({
auto_install = true,
sync_install = false,
ignore_install = {},
modules = {}, -- not used, but it will silence lua_ls
incremental_selection = {
enable = true,
keymaps = {
init_selection = "<Leader><Enter>",
node_incremental = "<Enter>",
node_decremental = "<BS>",
},
},
ensure_installed = {
"bash",
"c",
"cmake",
"comment",
"cpp",
"css",
"csv",
"diff",
"dockerfile",
"dot",
"git_config",
"git_rebase",
"gitattributes",
"gitcommit",
"gitignore",
"go",
"html",
"htmldjango",
"http",
"ini",
"javascript",
"json",
"kdl",
"kotlin",
"latex",
"lua",
"make",
"markdown",
"markdown_inline",
"mermaid",
"passwd",
"perl",
"php",
"proto",
"python",
"query",
"regex",
"ron",
"rst",
"rust",
"scss",
2025-09-01 21:21:07 -04:00
"slint",
2024-09-19 12:58:41 -03:00
"sql",
"terraform",
"toml",
"typescript",
"vim",
"vimdoc",
"xml",
"yaml",
},
highlight = { enable = true, indent = true },
playground = {
enable = false,
disable = {},
updatetime = 25, -- Debounced time for highlighting nodes in the playground from source code
persist_queries = false, -- Whether the query persists across vim sessions
keybindings = {
toggle_query_editor = 'o',
toggle_hl_groups = 'i',
toggle_injected_languages = 't',
toggle_anonymous_nodes = 'a',
toggle_language_display = 'I',
focus_language = 'f',
unfocus_language = 'F',
update = 'R',
goto_node = '<cr>',
show_help = '?',
},
},
query_linter = {
enable = true,
use_virtual_text = true,
lint_events = { "BufWrite", "CursorHold" },
},
})
end
}
}