Files
dotfiles/.config/nvim/lua/plugins/treesitter.lua
T
2024-11-25 14:22:44 -05:00

61 lines
1.4 KiB
Lua

return {
'nvim-treesitter/nvim-treesitter',
-- event = { "BufReadPre", "BufNewFile" },
lazy = true,
cmd = { 'TSUpdateSync', 'TSUpdate', 'TSInstall' },
build = ':TSUpdate',
dependencies = {
'windwp/nvim-ts-autotag',
},
opts = {
highlight = {
enable = true,
additional_vim_regex_highlighting = false,
},
indent = { enable = true, disable = {} },
autotag = { enable = true },
ensure_installed = {
'bash',
'css',
'diff',
'dockerfile',
'git_config',
'git_rebase',
'gitcommit',
'gitignore',
'graphql',
'html',
'javascript',
'json',
'lua',
'markdown',
'markdown_inline',
'python',
'regex',
'sql',
'todotxt',
'vim',
'vimdoc',
'xml',
'tmux',
'toml',
'yaml',
},
ignore_install = {},
sync_install = true,
auto_install = true,
incremental_selection = {
enable = true,
keymaps = {
init_selection = '<C-space>',
node_incremental = '<C-space>',
scope_incremental = false,
node_decremental = '<bs>',
},
},
},
config = function(_, opts)
require('nvim-treesitter.configs').setup(opts)
end,
}