-
Notifications
You must be signed in to change notification settings - Fork 3
/
tree-sitter.lua
52 lines (45 loc) · 1.93 KB
/
tree-sitter.lua
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
require'nvim-treesitter.configs'.setup {
-- A list of parser names, or "all"
ensure_installed = {
"bash",
"css",
"dockerfile",
"hcl",
"html",
"markdown",
"markdown_inline",
"python",
"rust",
"terraform",
"toml",
"yaml",
},
-- Install parsers synchronously (only applied to `ensure_installed`)
sync_install = true,
-- Automatically install missing parsers when entering buffer
-- Recommendation: set to false if you don't have `tree-sitter` CLI installed locally
auto_install = true,
-- List of parsers to ignore installing (for "all")
-- ignore_install = { "toml"},
highlight = {
enable = true,
-- NOTE: these're names of parsers and NOT the filetype.
-- e.g. disable highlighting for the `tex` filetype, you need to include
-- `latex` in this list as this is the name of the parser)
-- list of language that will be disabled
-- disable = { "toml"},
-- 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,
-- python disabled till this is resolved: github.com/nvim-treesitter/nvim-treesitter/issues/1136
disable = { "python" },
}
-- checkout incremental selection:
-- https://github.com/LazyVim/LazyVim/blob/7a8ca6222a554bdb78fb8de35404672fc4042302/lua/lazyvim/plugins/treesitter.lua#L57
}
local parser_config = require'nvim-treesitter.parsers'.get_parser_configs()