-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtreesitter.lua
98 lines (91 loc) · 2.3 KB
/
treesitter.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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
local parser_config = require('nvim-treesitter.parsers').get_parser_configs()
-- parser_config.vhdl = {
-- install_info = {
-- url = "https://github.com/jpt13653903/tree-sitter-vhdl.git",
-- files = { 'src/parser.c', 'src/scanner.c' },
-- branch = 'develop',
-- generate_requires_npm = false, -- if stand-alone parser without npm dependencies
-- requires_generate_from_grammar = false, -- if folder contains pre-generated src/parser.c
-- },
-- filetype = 'vhdl', -- if filetype does not match the parser name
-- }
parser_config.alcha = {
install_info = {
url = "https://github.com/jpt13653903/tree-sitter-alcha.git",
files = { 'src/parser.c', 'src/scanner.c' },
branch = 'master',
generate_requires_npm = false, -- if stand-alone parser without npm dependencies
requires_generate_from_grammar = false, -- if folder contains pre-generated src/parser.c
},
filetype = 'alcha', -- if filetype does not match the parser name
}
parser_config.hungarian = {
install_info = {
url = "https://github.com/jpt13653903/tree-sitter-hungarian.git",
files = { 'src/parser.c', 'src/scanner.c' },
branch = 'master',
generate_requires_npm = false, -- if stand-alone parser without npm dependencies
requires_generate_from_grammar = false, -- if folder contains pre-generated src/parser.c
},
filetype = 'hungarian', -- if filetype does not match the parser name
}
local treesitter = require('nvim-treesitter.configs')
treesitter.setup {
ensure_installed = {
'alcha',
'arduino',
'bash',
'bibtex',
'c',
'c_sharp',
'comment',
'cpp',
'css',
'csv',
'cuda',
'devicetree',
'diff',
'ebnf',
'git_config',
'git_rebase',
'gitattributes',
'gitcommit',
'gitignore',
'glsl',
'hlsl',
'html',
'htmldjango',
'http',
'hungarian',
'ini',
'javascript',
'json',
'json5',
'jsonc',
'latex',
'lua',
'luadoc',
'make',
'markdown',
'matlab',
'mermaid',
'objdump',
'passwd',
'python',
'ssh_config',
'toml',
'verilog',
'vhdl',
'vim',
'vimdoc',
'xml',
'yaml',
},
sync_install = false,
auto_install = true,
highlight = {
enable = true,
additional_vim_regex_highlighting = false,
},
-- indent = { enable = true }
}