aboutsummaryrefslogtreecommitdiff
path: root/treesitter.lua
blob: d28c99d3e2cb5283e76a92c339704c795a7798ec (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
require("nvim-treesitter.configs").setup {
	ensure_installed = {
		"bash",
		"c",
		"cpp",
		"glsl",
		"lua",
		"rust",
		"zig",
	},
	sync_install = false,
	auto_install = true,
	highlight = {
		enable = true,
		additional_vim_regex_highlighting = false,
	},
	incremental_selection = {
		enable = true,
		keymaps = {
			init_selection = "gnn",
			node_incremental = "grn",
			scope_incremental = "grc",
			node_decremental = "grm",
		},
	},
	indent = { enable = true },
}

vim.opt.foldmethod = "expr"
vim.opt.foldexpr = "nvim_treesitter#foldexpr()"
vim.opt.foldenable = false