dotfiles/nvim/lua/plugins/treesitter.lua

60 lines
1.1 KiB
Lua
Raw Normal View History

2024-10-27 16:21:40 +00:00
return {
"nvim-treesitter/nvim-treesitter",
event = { "BufReadPre", "BufNewFile" },
build = ":TSUpdate",
2026-03-01 15:37:12 +00:00
-- dependencies = {
-- "windwp/nvim-ts-autotag",
-- },
2024-10-27 16:21:40 +00:00
config = function()
local treesitter = require("nvim-treesitter.configs")
treesitter.setup({
highlight = {
enable = true,
additional_vim_regex_highlighting = false,
},
indent = { enable = true },
2026-03-01 15:37:12 +00:00
-- autotag = {
-- enable = true,
-- },
2024-10-27 16:21:40 +00:00
ensure_installed = {
"json",
"javascript",
"typescript",
"tsx",
"yaml",
"html",
"css",
"markdown",
"markdown_inline",
"bash",
"lua",
"vim",
"dockerfile",
"gitignore",
"c",
"python",
2024-11-17 15:09:38 +00:00
"hcl",
2024-10-27 16:21:40 +00:00
},
incremental_selection = {
enable = true,
keymaps = {
init_selection = "<C-space>",
node_incremental = "<C-space>",
scope_incremental = false,
node_decremental = "<bs>",
},
},
2026-03-01 15:37:12 +00:00
-- rainbow = {
-- enable = true,
-- disable = { "html" },
-- extended_mode = false,
-- max_file_lines = nil,
-- },
-- context_commentstring = {
-- enable = true,
-- enable_autocmd = false,
-- },
2024-10-27 16:21:40 +00:00
})
end,
}