1
0
Fork 0

initial treesitter config

This commit is contained in:
zymon 2024-08-26 12:31:38 +02:00
parent 38fd1b675e
commit 85c1157b9f
2 changed files with 77 additions and 0 deletions

View file

@ -73,3 +73,5 @@ vim.opt.foldcolumn = "4"
vim.opt.foldlevel = 99
vim.opt.foldlevelstart = 99
vim.opt.fillchars = "eob: ,fold: ,foldopen:,foldsep: ,foldclose:"
vim.opt.foldmethod = "expr"
vim.opt.foldexpr = "nvim_treesitter#foldexpr()"

View file

@ -0,0 +1,75 @@
return {
{ -- treesitter
"https://github.com/nvim-treesitter/nvim-treesitter",
build = ":TSUpdate",
event = "BufReadPre",
opts = {
highlight = { enable = true, },
indent = { enable = true },
ensure_installed = {
"asm",
"bash",
"bibtex",
"c",
"cmake",
"commonlisp",
"cpp",
"css",
"csv",
"cuda",
"d",
"devicetree",
"diff",
"dockerfile",
"erlang",
"elixir",
"heex",
"fennel",
"fortran",
"git_config", "git_rebase", "gitattributes", "gitcommit", "gitignore",
"haskell",
"html",
"http",
"javascript",
"json", "json5",
"julia",
"latex",
"llvm",
"lua", "luadoc",
"markdown", "markdown_inline",
"norg",
"objdump",
"passwd",
"python",
"regex",
"rst",
"rust",
"sql",
"ssh_config",
"systemverilog",
"tcl",
"toml",
"typst",
"verilog",
"vhdl",
"vim",
"vimdoc",
"xml",
"yaml",
},
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
},
}