neovim/lua/weeheavy/plugins/treesitter.lua

66 lines
1.2 KiB
Lua

-- Treesitter
return {
"nvim-treesitter/nvim-treesitter",
build = ":TSUpdate",
event = { "BufReadPre", "BufNewFile" },
dependencies = {
"nvim-treesitter/nvim-treesitter-textobjects",
},
config = function()
local treesitter = require("nvim-treesitter.configs")
treesitter.setup({
highlight = { enable = true },
indent = { enable = true },
auto_install = false,
-- language list: https://github.com/nvim-treesitter/nvim-treesitter#supported-languages
ensure_installed = {
"lua",
"comment", -- used for TODO/FIXME/NOTE etc
"vim",
"vimdoc",
"bash",
"diff",
"gitignore",
"markdown",
"markdown_inline",
"elixir",
"eex",
"heex",
"yaml",
"html",
"javascript",
"css",
"dockerfile",
"query",
"hcl",
"bicep",
"csv",
"properties",
"ini",
"python",
"regex",
"json",
"go",
"gomod",
"gosum",
"tcl",
"editorconfig",
"http",
"make",
"toml",
"latex",
"sql",
},
incremental_selection = {
enable = true,
keymaps = {
init_selection = "<C-space>",
node_incremental = "<C-space>",
scope_incremental = false,
node_decremental = "<bs>",
},
},
})
end,
}