tb-dotfiles/chezmoi/private_dot_config/nvim/lua/plugins/treesitter.lua
2023-06-20 17:13:50 -04:00

28 lines
978 B
Lua

-- Highlight, edit, and navigate code
return {
{
"nvim-treesitter/nvim-treesitter",
build = function()
pcall(require("nvim-treesitter.install").update({ with_sync = true }))
end,
config = function()
require("nvim-treesitter.configs").setup({
-- Add languages to be installed here that you want installed for treesitter
ensure_installed = { "go", "javascript", "lua", "python", "rust", "typescript", "vim" },
auto_install = true,
highlight = {
enable = true,
-- Setting this to true will run `:h syntax` and tree-sitter at the same time.
-- Set this to `true` if you depend on 'syntax' being enabled (like for indentation).
-- Using this option may slow down your editor, and you may see some duplicate highlights.
-- Instead of true it can also be a list of languages
additional_vim_regex_highlighting = false,
},
indent = { enable = true },
incremental_selection = { enable = true },
})
end,
},
}