on master help sign in
add tree-sitter sources to languages.toml
c1f90a1Michael Davis
helix-core/src/indent.rs+1
@@ -444,6 +444,7 @@ where
444 debugger: None,
444 debugger: None,
445 auto_pairs: None,
445 auto_pairs: None,
446 }],
446 }],
447+ grammar: vec![],
447 });
448 });
448
449
449 // set runtime path so we can find the queries
450 // set runtime path so we can find the queries
helix-core/src/syntax.rs+28−1
@@ -54,6 +54,7 @@ where
54#[serde(deny_unknown_fields)]
54#[serde(deny_unknown_fields)]
55pub struct Configuration {
55pub struct Configuration {
56 pub language: Vec<LanguageConfiguration>,
56 pub language: Vec<LanguageConfiguration>,
57+ pub grammar: Vec<GrammarConfiguration>,
57}
58}
58
59
59// largely based on tree-sitter/cli/src/loader.rs
60// largely based on tree-sitter/cli/src/loader.rs
@@ -239,6 +240,29 @@ pub struct IndentQuery {
239 pub outdent: HashSet<String>,
240 pub outdent: HashSet<String>,
240}
241}
241
242
243+#[derive(Debug, Serialize, Deserialize)]
244+pub struct GrammarConfiguration {
245+ #[serde(rename = "name")]
246+ pub grammar_id: String, // c-sharp, rust
247+ pub source: GrammarSource,
248+ pub path: Option<String>,
249+}
250+
251+#[derive(Debug, Serialize, Deserialize)]
252+#[serde(rename_all = "lowercase")]
253+#[serde(untagged)]
254+pub enum GrammarSource {
255+ Local {
256+ path: String,
257+ },
258+ Git {
259+ #[serde(rename = "git")]
260+ remote: String,
261+ #[serde(rename = "rev")]
262+ revision: String,
263+ },
264+}
265+
242#[derive(Debug)]
266#[derive(Debug)]
243pub struct TextObjectQuery {
267pub struct TextObjectQuery {
244 pub query: Query,
268 pub query: Query,
@@ -2055,7 +2079,10 @@ mod test {
2055 .map(String::from)
2079 .map(String::from)
2056 .collect();
2080 .collect();
2057
2081
2058− let loader = Loader::new(Configuration { language: vec![] });
2082+ let loader = Loader::new(Configuration {
2083+ language: vec![],
2084+ grammar: vec![],
2085+ });
2059
2086
2060 let language = get_language(&crate::RUNTIME_DIR, "Rust").unwrap();
2087 let language = get_language(&crate::RUNTIME_DIR, "Rust").unwrap();
2061 let config = HighlightConfiguration::new(
2088 let config = HighlightConfiguration::new(
languages.toml+246−27
@@ -45,6 +45,10 @@ request = "attach"
45completion = [ { name = "lldb connect url", default = "connect://localhost:3333" }, { name = "file", completion = "filename" }, "pid" ]
45completion = [ { name = "lldb connect url", default = "connect://localhost:3333" }, { name = "file", completion = "filename" }, "pid" ]
46args = { attachCommands = [ "platform select remote-gdb-server", "platform connect {0}", "file {1}", "attach {2}" ] }
46args = { attachCommands = [ "platform select remote-gdb-server", "platform connect {0}", "file {1}", "attach {2}" ] }
47
47
48+[[grammar]]
49+name = "rust"
50+source = { git = "https://github.com/tree-sitter/tree-sitter-rust", rev = "a360da0a29a19c281d08295a35ecd0544d2da211" }
51+
48[[language]]
52[[language]]
49name = "toml"
53name = "toml"
50scope = "source.toml"
54scope = "source.toml"
@@ -52,9 +56,12 @@ injection-regex = "toml"
52file-types = ["toml"]
56file-types = ["toml"]
53roots = []
57roots = []
54comment-token = "#"
58comment-token = "#"
55−
56indent = { tab-width = 2, unit = " " }
59indent = { tab-width = 2, unit = " " }
57
60
61+[[grammar]]
62+name = "toml"
63+source = { git = "https://github.com/ikatyang/tree-sitter-toml", rev = "7cff70bbcbbc62001b465603ca1ea88edd668704" }
64+
58[[language]]
65[[language]]
59name = "protobuf"
66name = "protobuf"
60scope = "source.proto"
67scope = "source.proto"
@@ -62,9 +69,12 @@ injection-regex = "protobuf"
62file-types = ["proto"]
69file-types = ["proto"]
63roots = []
70roots = []
64comment-token = "//"
71comment-token = "//"
65−
66indent = { tab-width = 2, unit = " " }
72indent = { tab-width = 2, unit = " " }
67
73
74+[[grammar]]
75+name = "protobuf"
76+source = { git = "https://github.com/yusdacra/tree-sitter-protobuf", rev = "19c211a01434d9f03efff99f85e19f967591b175" }
77+
68[[language]]
78[[language]]
69name = "elixir"
79name = "elixir"
70scope = "source.elixir"
80scope = "source.elixir"
@@ -73,10 +83,13 @@ file-types = ["ex", "exs"]
73shebangs = ["elixir"]
83shebangs = ["elixir"]
74roots = []
84roots = []
75comment-token = "#"
85comment-token = "#"
76−
77language-server = { command = "elixir-ls" }
86language-server = { command = "elixir-ls" }
78indent = { tab-width = 2, unit = " " }
87indent = { tab-width = 2, unit = " " }
79
88
89+[[grammar]]
90+name = "elixir"
91+source = { git = "https://github.com/elixir-lang/tree-sitter-elixir", rev = "f5d7bda543da788bd507b05bd722627dde66c9ec" }
92+
80[[language]]
93[[language]]
81name = "fish"
94name = "fish"
82scope = "source.fish"
95scope = "source.fish"
@@ -85,9 +98,12 @@ file-types = ["fish"]
85shebangs = ["fish"]
98shebangs = ["fish"]
86roots = []
99roots = []
87comment-token = "#"
100comment-token = "#"
88−
89indent = { tab-width = 4, unit = " " }
101indent = { tab-width = 4, unit = " " }
90
102
103+[[grammar]]
104+name = "fish"
105+source = { git = "https://github.com/ram02z/tree-sitter-fish", rev = "04e54ab6585dfd4fee6ddfe5849af56f101b6d4f" }
106+
91[[language]]
107[[language]]
92name = "mint"
108name = "mint"
93scope = "source.mint"
109scope = "source.mint"
@@ -96,7 +112,6 @@ file-types = ["mint"]
96shebangs = []
112shebangs = []
97roots = []
113roots = []
98comment-token = "//"
114comment-token = "//"
99−
100language-server = { command = "mint", args = ["ls"] }
115language-server = { command = "mint", args = ["ls"] }
101indent = { tab-width = 2, unit = " " }
116indent = { tab-width = 2, unit = " " }
102
117
@@ -106,9 +121,12 @@ scope = "source.json"
106injection-regex = "json"
121injection-regex = "json"
107file-types = ["json"]
122file-types = ["json"]
108roots = []
123roots = []
109−
110indent = { tab-width = 2, unit = " " }
124indent = { tab-width = 2, unit = " " }
111
125
126+[[grammar]]
127+name = "json"
128+source = { git = "https://github.com/tree-sitter/tree-sitter-json", rev = "65bceef69c3b0f24c0b19ce67d79f57c96e90fcb" }
129+
112[[language]]
130[[language]]
113name = "c"
131name = "c"
114scope = "source.c"
132scope = "source.c"
@@ -116,7 +134,6 @@ injection-regex = "c"
116file-types = ["c"] # TODO: ["h"]
134file-types = ["c"] # TODO: ["h"]
117roots = []
135roots = []
118comment-token = "//"
136comment-token = "//"
119−
120language-server = { command = "clangd" }
137language-server = { command = "clangd" }
121indent = { tab-width = 2, unit = " " }
138indent = { tab-width = 2, unit = " " }
122
139
@@ -143,6 +160,10 @@ request = "attach"
143completion = [ { name = "lldb connect url", default = "connect://localhost:3333" }, { name = "file", completion = "filename" }, "pid" ]
160completion = [ { name = "lldb connect url", default = "connect://localhost:3333" }, { name = "file", completion = "filename" }, "pid" ]
144args = { console = "internalConsole", attachCommands = [ "platform select remote-gdb-server", "platform connect {0}", "file {1}", "attach {2}" ] }
161args = { console = "internalConsole", attachCommands = [ "platform select remote-gdb-server", "platform connect {0}", "file {1}", "attach {2}" ] }
145
162
163+[[grammar]]
164+name = "c"
165+source = { git = "https://github.com/tree-sitter/tree-sitter-c", rev = "f05e279aedde06a25801c3f2b2cc8ac17fac52ae" }
166+
146[[language]]
167[[language]]
147name = "cpp"
168name = "cpp"
148scope = "source.cpp"
169scope = "source.cpp"
@@ -150,7 +171,6 @@ injection-regex = "cpp"
150file-types = ["cc", "hh", "cpp", "hpp", "h", "ipp", "tpp", "cxx", "hxx", "ixx", "txx", "ino"]
171file-types = ["cc", "hh", "cpp", "hpp", "h", "ipp", "tpp", "cxx", "hxx", "ixx", "txx", "ino"]
151roots = []
172roots = []
152comment-token = "//"
173comment-token = "//"
153−
154language-server = { command = "clangd" }
174language-server = { command = "clangd" }
155indent = { tab-width = 2, unit = " " }
175indent = { tab-width = 2, unit = " " }
156
176
@@ -177,6 +197,10 @@ request = "attach"
177completion = [ { name = "lldb connect url", default = "connect://localhost:3333" }, { name = "file", completion = "filename" }, "pid" ]
197completion = [ { name = "lldb connect url", default = "connect://localhost:3333" }, { name = "file", completion = "filename" }, "pid" ]
178args = { console = "internalConsole", attachCommands = [ "platform select remote-gdb-server", "platform connect {0}", "file {1}", "attach {2}" ] }
198args = { console = "internalConsole", attachCommands = [ "platform select remote-gdb-server", "platform connect {0}", "file {1}", "attach {2}" ] }
179
199
200+[[grammar]]
201+name = "cpp"
202+source = { git = "https://github.com/tree-sitter/tree-sitter-cpp", rev = "e8dcc9d2b404c542fd236ea5f7208f90be8a6e89" }
203+
180[[language]]
204[[language]]
181name = "c-sharp"
205name = "c-sharp"
182scope = "source.csharp"
206scope = "source.csharp"
@@ -184,9 +208,12 @@ injection-regex = "c-?sharp"
184file-types = ["cs"]
208file-types = ["cs"]
185roots = []
209roots = []
186comment-token = "//"
210comment-token = "//"
187−
188indent = { tab-width = 4, unit = "\t" }
211indent = { tab-width = 4, unit = "\t" }
189
212
213+[[grammar]]
214+name = "c-sharp"
215+source = { git = "https://github.com/tree-sitter/tree-sitter-c-sharp", rev = "53a65a908167d6556e1fcdb67f1ee62aac101dda" }
216+
190[[language]]
217[[language]]
191name = "go"
218name = "go"
192scope = "source.go"
219scope = "source.go"
@@ -195,7 +222,6 @@ file-types = ["go"]
195roots = ["Gopkg.toml", "go.mod"]
222roots = ["Gopkg.toml", "go.mod"]
196auto-format = true
223auto-format = true
197comment-token = "//"
224comment-token = "//"
198−
199language-server = { command = "gopls" }
225language-server = { command = "gopls" }
200# TODO: gopls needs utf-8 offsets?
226# TODO: gopls needs utf-8 offsets?
201indent = { tab-width = 4, unit = "\t" }
227indent = { tab-width = 4, unit = "\t" }
@@ -231,6 +257,10 @@ request = "attach"
231completion = [ "pid" ]
257completion = [ "pid" ]
232args = { mode = "local", processId = "{0}" }
258args = { mode = "local", processId = "{0}" }
233
259
260+[[grammar]]
261+name = "go"
262+source = { git = "https://github.com/tree-sitter/tree-sitter-go", rev = "0fa917a7022d1cd2e9b779a6a8fc5dc7fad69c75" }
263+
234[[language]]
264[[language]]
235name = "javascript"
265name = "javascript"
236scope = "source.js"
266scope = "source.js"
@@ -240,7 +270,6 @@ shebangs = ["node"]
240roots = []
270roots = []
241comment-token = "//"
271comment-token = "//"
242# TODO: highlights-jsx, highlights-params
272# TODO: highlights-jsx, highlights-params
243−
244language-server = { command = "typescript-language-server", args = ["--stdio"], language-id = "javascript" }
273language-server = { command = "typescript-language-server", args = ["--stdio"], language-id = "javascript" }
245indent = { tab-width = 2, unit = " " }
274indent = { tab-width = 2, unit = " " }
246
275
@@ -256,6 +285,10 @@ request = "launch"
256completion = [ { name = "main", completion = "filename", default = "index.js" } ]
285completion = [ { name = "main", completion = "filename", default = "index.js" } ]
257args = { program = "{0}" }
286args = { program = "{0}" }
258
287
288+[[grammar]]
289+name = "javascript"
290+source = { git = "https://github.com/tree-sitter/tree-sitter-javascript", rev = "4a95461c4761c624f2263725aca79eeaefd36cad" }
291+
259[[language]]
292[[language]]
260name = "typescript"
293name = "typescript"
261scope = "source.ts"
294scope = "source.ts"
@@ -264,10 +297,14 @@ file-types = ["ts"]
264shebangs = []
297shebangs = []
265roots = []
298roots = []
266# TODO: highlights-jsx, highlights-params
299# TODO: highlights-jsx, highlights-params
267−
268language-server = { command = "typescript-language-server", args = ["--stdio"], language-id = "typescript"}
300language-server = { command = "typescript-language-server", args = ["--stdio"], language-id = "typescript"}
269indent = { tab-width = 2, unit = " " }
301indent = { tab-width = 2, unit = " " }
270
302
303+[[grammar]]
304+name = "typescript"
305+source = { git = "https://github.com/tree-sitter/tree-sitter-typescript", rev = "3e897ea5925f037cfae2e551f8e6b12eec2a201a" }
306+path = "typescript"
307+
271[[language]]
308[[language]]
272name = "tsx"
309name = "tsx"
273scope = "source.tsx"
310scope = "source.tsx"
@@ -275,28 +312,38 @@ injection-regex = "^(tsx)$" # |typescript
275file-types = ["tsx"]
312file-types = ["tsx"]
276roots = []
313roots = []
277# TODO: highlights-jsx, highlights-params
314# TODO: highlights-jsx, highlights-params
278−
279language-server = { command = "typescript-language-server", args = ["--stdio"], language-id = "typescriptreact" }
315language-server = { command = "typescript-language-server", args = ["--stdio"], language-id = "typescriptreact" }
280indent = { tab-width = 2, unit = " " }
316indent = { tab-width = 2, unit = " " }
281
317
318+[[grammar]]
319+name = "tsx"
320+source = { git = "https://github.com/tree-sitter/tree-sitter-typescript", rev = "3e897ea5925f037cfae2e551f8e6b12eec2a201a" }
321+path = "tsx"
322+
282[[language]]
323[[language]]
283name = "css"
324name = "css"
284scope = "source.css"
325scope = "source.css"
285injection-regex = "css"
326injection-regex = "css"
286file-types = ["css", "scss"]
327file-types = ["css", "scss"]
287roots = []
328roots = []
288−
289indent = { tab-width = 2, unit = " " }
329indent = { tab-width = 2, unit = " " }
290
330
331+[[grammar]]
332+name = "css"
333+source = { git = "https://github.com/tree-sitter/tree-sitter-css", rev = "94e10230939e702b4fa3fa2cb5c3bc7173b95d07" }
334+
291[[language]]
335[[language]]
292name = "html"
336name = "html"
293scope = "text.html.basic"
337scope = "text.html.basic"
294injection-regex = "html"
338injection-regex = "html"
295file-types = ["html"]
339file-types = ["html"]
296roots = []
340roots = []
297−
298indent = { tab-width = 2, unit = " " }
341indent = { tab-width = 2, unit = " " }
299
342
343+[[grammar]]
344+name = "html"
345+source = { git = "https://github.com/tree-sitter/tree-sitter-html", rev = "d93af487cc75120c89257195e6be46c999c6ba18" }
346+
300[[language]]
347[[language]]
301name = "python"
348name = "python"
302scope = "source.python"
349scope = "source.python"
@@ -305,11 +352,14 @@ file-types = ["py"]
305shebangs = ["python"]
352shebangs = ["python"]
306roots = []
353roots = []
307comment-token = "#"
354comment-token = "#"
308−
309language-server = { command = "pylsp" }
355language-server = { command = "pylsp" }
310# TODO: pyls needs utf-8 offsets
356# TODO: pyls needs utf-8 offsets
311indent = { tab-width = 4, unit = " " }
357indent = { tab-width = 4, unit = " " }
312
358
359+[[grammar]]
360+name = "python"
361+source = { git = "https://github.com/tree-sitter/tree-sitter-python", rev = "d6210ceab11e8d812d4ab59c07c81458ec6e5184" }
362+
313[[language]]
363[[language]]
314name = "nix"
364name = "nix"
315scope = "source.nix"
365scope = "source.nix"
@@ -318,10 +368,13 @@ file-types = ["nix"]
318shebangs = []
368shebangs = []
319roots = []
369roots = []
320comment-token = "#"
370comment-token = "#"
321−
322language-server = { command = "rnix-lsp" }
371language-server = { command = "rnix-lsp" }
323indent = { tab-width = 2, unit = " " }
372indent = { tab-width = 2, unit = " " }
324
373
374+[[grammar]]
375+name = "nix"
376+source = { git = "https://github.com/cstrahan/tree-sitter-nix", rev = "50f38ceab667f9d482640edfee803d74f4edeba5" }
377+
325[[language]]
378[[language]]
326name = "ruby"
379name = "ruby"
327scope = "source.ruby"
380scope = "source.ruby"
@@ -330,10 +383,13 @@ file-types = ["rb"]
330shebangs = ["ruby"]
383shebangs = ["ruby"]
331roots = []
384roots = []
332comment-token = "#"
385comment-token = "#"
333−
334language-server = { command = "solargraph", args = ["stdio"] }
386language-server = { command = "solargraph", args = ["stdio"] }
335indent = { tab-width = 2, unit = " " }
387indent = { tab-width = 2, unit = " " }
336
388
389+[[grammar]]
390+name = "ruby"
391+source = { git = "https://github.com/tree-sitter/tree-sitter-ruby", rev = "dfff673b41df7fadcbb609c6338f38da3cdd018e" }
392+
337[[language]]
393[[language]]
338name = "bash"
394name = "bash"
339scope = "source.bash"
395scope = "source.bash"
@@ -342,10 +398,13 @@ file-types = ["sh", "bash", "zsh", ".bash_login", ".bash_logout", ".bash_profile
342shebangs = ["sh", "bash", "dash"]
398shebangs = ["sh", "bash", "dash"]
343roots = []
399roots = []
344comment-token = "#"
400comment-token = "#"
345−
346language-server = { command = "bash-language-server", args = ["start"] }
401language-server = { command = "bash-language-server", args = ["start"] }
347indent = { tab-width = 2, unit = " " }
402indent = { tab-width = 2, unit = " " }
348
403
404+[[grammar]]
405+name = "bash"
406+source = { git = "https://github.com/tree-sitter/tree-sitter-bash", rev = "a8eb5cb57c66f74c63ab950de081207cccf52017" }
407+
349[[language]]
408[[language]]
350name = "php"
409name = "php"
351scope = "source.php"
410scope = "source.php"
@@ -353,18 +412,24 @@ injection-regex = "php"
353file-types = ["php"]
412file-types = ["php"]
354shebangs = ["php"]
413shebangs = ["php"]
355roots = []
414roots = []
356−
357indent = { tab-width = 4, unit = " " }
415indent = { tab-width = 4, unit = " " }
358
416
417+[[grammar]]
418+name = "php"
419+source = { git = "https://github.com/tree-sitter/tree-sitter-php", rev = "57f855461aeeca73bd4218754fb26b5ac143f98f" }
420+
359[[language]]
421[[language]]
360name = "twig"
422name = "twig"
361scope = "source.twig"
423scope = "source.twig"
362injection-regex = "twig"
424injection-regex = "twig"
363file-types = ["twig"]
425file-types = ["twig"]
364roots = []
426roots = []
365−
366indent = { tab-width = 2, unit = " " }
427indent = { tab-width = 2, unit = " " }
367
428
429+[[grammar]]
430+name = "twig"
431+source = { git = "https://github.com/eirabben/tree-sitter-twig", rev = "b7444181fb38e603e25ea8fcdac55f9492e49c27" }
432+
368[[language]]
433[[language]]
369name = "latex"
434name = "latex"
370scope = "source.tex"
435scope = "source.tex"
@@ -372,9 +437,12 @@ injection-regex = "tex"
372file-types = ["tex"]
437file-types = ["tex"]
373roots = []
438roots = []
374comment-token = "%"
439comment-token = "%"
375−
376indent = { tab-width = 4, unit = "\t" }
440indent = { tab-width = 4, unit = "\t" }
377
441
442+[[grammar]]
443+name = "latex"
444+source = { git = "https://github.com/latex-lsp/tree-sitter-latex", rev = "7f720661de5316c0f8fee956526d4002fa1086d8" }
445+
378[[language]]
446[[language]]
379name = "lean"
447name = "lean"
380scope = "source.lean"
448scope = "source.lean"
@@ -383,9 +451,12 @@ file-types = ["lean"]
383roots = [ "lakefile.lean" ]
451roots = [ "lakefile.lean" ]
384comment-token = "--"
452comment-token = "--"
385language-server = { command = "lean", args = [ "--server" ] }
453language-server = { command = "lean", args = [ "--server" ] }
386−
387indent = { tab-width = 2, unit = " " }
454indent = { tab-width = 2, unit = " " }
388
455
456+[[grammar]]
457+name = "lean"
458+source = { git = "https://github.com/Julian/tree-sitter-lean", rev = "d98426109258b266e1e92358c5f11716d2e8f638" }
459+
389[[language]]
460[[language]]
390name = "julia"
461name = "julia"
391scope = "source.julia"
462scope = "source.julia"
@@ -410,6 +481,10 @@ language-server = { command = "julia", args = [
410 ] }
481 ] }
411indent = { tab-width = 2, unit = " " }
482indent = { tab-width = 2, unit = " " }
412
483
484+[[grammar]]
485+name = "julia"
486+source = { git = "https://github.com/tree-sitter/tree-sitter-julia", rev = "12ea597262125fc22fd2e91aa953ac69b19c26ca" }
487+
413[[language]]
488[[language]]
414name = "java"
489name = "java"
415scope = "source.java"
490scope = "source.java"
@@ -418,6 +493,10 @@ file-types = ["java"]
418roots = ["pom.xml"]
493roots = ["pom.xml"]
419indent = { tab-width = 4, unit = " " }
494indent = { tab-width = 4, unit = " " }
420
495
496+[[grammar]]
497+name = "java"
498+source = { git = "https://github.com/tree-sitter/tree-sitter-java", rev = "bd6186c24d5eb13b4623efac9d944dcc095c0dad" }
499+
421[[language]]
500[[language]]
422name = "ledger"
501name = "ledger"
423scope = "source.ledger"
502scope = "source.ledger"
@@ -427,6 +506,10 @@ roots = []
427comment-token = ";"
506comment-token = ";"
428indent = { tab-width = 4, unit = " " }
507indent = { tab-width = 4, unit = " " }
429
508
509+[[grammar]]
510+name = "ledger"
511+source = { git = "https://github.com/cbarrete/tree-sitter-ledger", rev = "0cdeb0e51411a3ba5493662952c3039de08939ca" }
512+
430[[language]]
513[[language]]
431name = "ocaml"
514name = "ocaml"
432scope = "source.ocaml"
515scope = "source.ocaml"
@@ -437,6 +520,11 @@ roots = []
437comment-token = "(**)"
520comment-token = "(**)"
438indent = { tab-width = 2, unit = " " }
521indent = { tab-width = 2, unit = " " }
439
522
523+[[grammar]]
524+name = "ocaml"
525+source = { git = "https://github.com/tree-sitter/tree-sitter-ocaml", rev = "23d419ba45789c5a47d31448061557716b02750a" }
526+path = "ocaml"
527+
440[[language]]
528[[language]]
441name = "ocaml-interface"
529name = "ocaml-interface"
442scope = "source.ocaml.interface"
530scope = "source.ocaml.interface"
@@ -446,6 +534,11 @@ roots = []
446comment-token = "(**)"
534comment-token = "(**)"
447indent = { tab-width = 2, unit = " "}
535indent = { tab-width = 2, unit = " "}
448
536
537+[[grammar]]
538+name = "ocaml-interface"
539+source = { git = "https://github.com/tree-sitter/tree-sitter-ocaml", rev = "23d419ba45789c5a47d31448061557716b02750a" }
540+path = "interface"
541+
449[[language]]
542[[language]]
450name = "lua"
543name = "lua"
451scope = "source.lua"
544scope = "source.lua"
@@ -455,6 +548,10 @@ roots = []
455comment-token = "--"
548comment-token = "--"
456indent = { tab-width = 2, unit = " " }
549indent = { tab-width = 2, unit = " " }
457
550
551+[[grammar]]
552+name = "lua"
553+source = { git = "https://github.com/nvim-treesitter/tree-sitter-lua", rev = "6f5d40190ec8a0aa8c8410699353d820f4f7d7a6" }
554+
458[[language]]
555[[language]]
459name = "svelte"
556name = "svelte"
460scope = "source.svelte"
557scope = "source.svelte"
@@ -464,6 +561,9 @@ roots = []
464indent = { tab-width = 2, unit = " " }
561indent = { tab-width = 2, unit = " " }
465language-server = { command = "svelteserver", args = ["--stdio"] }
562language-server = { command = "svelteserver", args = ["--stdio"] }
466
563
564+[[grammar]]
565+name = "svelte"
566+source = { git = "https://github.com/Himujjal/tree-sitter-svelte", rev = "349a5984513b4a4a9e143a6e746120c6ff6cf6ed" }
467
567
468[[language]]
568[[language]]
469name = "vue"
569name = "vue"
@@ -473,6 +573,10 @@ file-types = ["vue"]
473roots = []
573roots = []
474indent = { tab-width = 2, unit = " " }
574indent = { tab-width = 2, unit = " " }
475
575
576+[[grammar]]
577+name = "vue"
578+source = { git = "https://github.com/ikatyang/tree-sitter-vue", rev = "91fe2754796cd8fba5f229505a23fa08f3546c06" }
579+
476[[language]]
580[[language]]
477name = "yaml"
581name = "yaml"
478scope = "source.yaml"
582scope = "source.yaml"
@@ -482,6 +586,10 @@ comment-token = "#"
482indent = { tab-width = 2, unit = " " }
586indent = { tab-width = 2, unit = " " }
483injection-regex = "yml|yaml"
587injection-regex = "yml|yaml"
484
588
589+[[grammar]]
590+name = "yaml"
591+source = { git = "https://github.com/ikatyang/tree-sitter-yaml", rev = "0e36bed171768908f331ff7dff9d956bae016efb" }
592+
485[[language]]
593[[language]]
486name = "haskell"
594name = "haskell"
487scope = "source.haskell"
595scope = "source.haskell"
@@ -492,6 +600,10 @@ comment-token = "--"
492language-server = { command = "haskell-language-server-wrapper", args = ["--lsp"] }
600language-server = { command = "haskell-language-server-wrapper", args = ["--lsp"] }
493indent = { tab-width = 2, unit = " " }
601indent = { tab-width = 2, unit = " " }
494
602
603+[[grammar]]
604+name = "haskell"
605+source = { git = "https://github.com/tree-sitter/tree-sitter-haskell", rev = "b6ec26f181dd059eedd506fa5fbeae1b8e5556c8" }
606+
495[[language]]
607[[language]]
496name = "zig"
608name = "zig"
497scope = "source.zig"
609scope = "source.zig"
@@ -500,10 +612,13 @@ file-types = ["zig"]
500roots = ["build.zig"]
612roots = ["build.zig"]
501auto-format = true
613auto-format = true
502comment-token = "//"
614comment-token = "//"
503−
504language-server = { command = "zls" }
615language-server = { command = "zls" }
505indent = { tab-width = 4, unit = " " }
616indent = { tab-width = 4, unit = " " }
506
617
618+[[grammar]]
619+name = "zig"
620+source = { git = "https://github.com/maxxnino/tree-sitter-zig", rev = "93331b8bd8b4ebee2b575490b2758f16ad4e9f30" }
621+
507[[language]]
622[[language]]
508name = "prolog"
623name = "prolog"
509scope = "source.prolog"
624scope = "source.prolog"
@@ -511,7 +626,6 @@ roots = []
511file-types = ["pl", "prolog"]
626file-types = ["pl", "prolog"]
512shebangs = ["swipl"]
627shebangs = ["swipl"]
513comment-token = "%"
628comment-token = "%"
514−
515language-server = { command = "swipl", args = [
629language-server = { command = "swipl", args = [
516 "-g", "use_module(library(lsp_server))",
630 "-g", "use_module(library(lsp_server))",
517 "-g", "lsp_server:main",
631 "-g", "lsp_server:main",
@@ -526,6 +640,10 @@ comment-token = ";"
526injection-regex = "tsq"
640injection-regex = "tsq"
527indent = { tab-width = 2, unit = " " }
641indent = { tab-width = 2, unit = " " }
528
642
643+[[grammar]]
644+name = "tsq"
645+source = { git = "https://github.com/tree-sitter/tree-sitter-tsq", rev = "b665659d3238e6036e22ed0e24935e60efb39415" }
646+
529[[language]]
647[[language]]
530name = "cmake"
648name = "cmake"
531scope = "source.cmake"
649scope = "source.cmake"
@@ -536,6 +654,10 @@ indent = { tab-width = 2, unit = " " }
536language-server = { command = "cmake-language-server" }
654language-server = { command = "cmake-language-server" }
537injection-regex = "cmake"
655injection-regex = "cmake"
538
656
657+[[grammar]]
658+name = "cmake"
659+source = { git = "https://github.com/uyha/tree-sitter-cmake", rev = "f6616f1e417ee8b62daf251aa1daa5d73781c596" }
660+
539[[language]]
661[[language]]
540name = "make"
662name = "make"
541scope = "source.make"
663scope = "source.make"
@@ -544,6 +666,10 @@ roots =[]
544comment-token = "#"
666comment-token = "#"
545indent = { tab-width = 4, unit = "\t" }
667indent = { tab-width = 4, unit = "\t" }
546
668
669+[[grammar]]
670+name = "make"
671+source = { git = "https://github.com/alemuller/tree-sitter-make", rev = "a4b9187417d6be349ee5fd4b6e77b4172c6827dd" }
672+
547[[language]]
673[[language]]
548name = "glsl"
674name = "glsl"
549scope = "source.glsl"
675scope = "source.glsl"
@@ -553,6 +679,10 @@ comment-token = "//"
553indent = { tab-width = 4, unit = " " }
679indent = { tab-width = 4, unit = " " }
554injection-regex = "glsl"
680injection-regex = "glsl"
555
681
682+[[grammar]]
683+name = "glsl"
684+source = { git = "https://github.com/theHamsta/tree-sitter-glsl", rev = "88408ffc5e27abcffced7010fc77396ae3636d7e" }
685+
556[[language]]
686[[language]]
557name = "perl"
687name = "perl"
558scope = "source.perl"
688scope = "source.perl"
@@ -562,6 +692,10 @@ roots = []
562comment-token = "#"
692comment-token = "#"
563indent = { tab-width = 2, unit = " " }
693indent = { tab-width = 2, unit = " " }
564
694
695+[[grammar]]
696+name = "perl"
697+source = { git = "https://github.com/ganezdragon/tree-sitter-perl", rev = "0ac2c6da562c7a2c26ed7e8691d4a590f7e8b90a" }
698+
565[[language]]
699[[language]]
566name = "racket"
700name = "racket"
567scope = "source.rkt"
701scope = "source.rkt"
@@ -578,6 +712,10 @@ roots = []
578file-types = []
712file-types = []
579injection-regex = "comment"
713injection-regex = "comment"
580
714
715+[[grammar]]
716+name = "comment"
717+source = { git = "https://github.com/stsewd/tree-sitter-comment", rev = "5dd3c62f1bbe378b220fe16b317b85247898639e" }
718+
581[[language]]
719[[language]]
582name = "wgsl"
720name = "wgsl"
583scope = "source.wgsl"
721scope = "source.wgsl"
@@ -586,6 +724,10 @@ roots = []
586comment-token = "//"
724comment-token = "//"
587indent = { tab-width = 4, unit = " " }
725indent = { tab-width = 4, unit = " " }
588
726
727+[[grammar]]
728+name = "wgsl"
729+source = { git = "https://github.com/szebniok/tree-sitter-wgsl", rev = "f00ff52251edbd58f4d39c9c3204383253032c11" }
730+
589[[language]]
731[[language]]
590name = "llvm"
732name = "llvm"
591scope = "source.llvm"
733scope = "source.llvm"
@@ -595,6 +737,10 @@ comment-token = ";"
595indent = { tab-width = 2, unit = " " }
737indent = { tab-width = 2, unit = " " }
596injection-regex = "llvm"
738injection-regex = "llvm"
597
739
740+[[grammar]]
741+name = "llvm"
742+source = { git = "https://github.com/benwilliamgraham/tree-sitter-llvm", rev = "3b213925b9c4f42c1acfe2e10bfbb438d9c6834d" }
743+
598[[language]]
744[[language]]
599name = "llvm-mir"
745name = "llvm-mir"
600scope = "source.llvm_mir"
746scope = "source.llvm_mir"
@@ -604,9 +750,15 @@ comment-token = ";"
604indent = { tab-width = 2, unit = " " }
750indent = { tab-width = 2, unit = " " }
605injection-regex = "mir"
751injection-regex = "mir"
606
752
753+[[grammar]]
754+name = "llvm-mir"
755+source = { git = "https://github.com/Flakebi/tree-sitter-llvm-mir", rev = "06fabca19454b2dc00c1b211a7cb7ad0bc2585f1" }
756+
607[[language]]
757[[language]]
608name = "llvm-mir-yaml"
758name = "llvm-mir-yaml"
609−tree-sitter-library = "yaml"
759+# TODO allow languages to point to their grammar like so:
760+#
761+# grammar = "yaml"
610scope = "source.yaml"
762scope = "source.yaml"
611roots = []
763roots = []
612file-types = ["mir"]
764file-types = ["mir"]
@@ -622,15 +774,22 @@ comment-token = "//"
622indent = { tab-width = 2, unit = " " }
774indent = { tab-width = 2, unit = " " }
623injection-regex = "tablegen"
775injection-regex = "tablegen"
624
776
777+[[grammar]]
778+name = "tablegen"
779+source = { git = "https://github.com/Flakebi/tree-sitter-tablegen", rev = "568dd8a937347175fd58db83d4c4cdaeb6069bd2" }
780+
625[[language]]
781[[language]]
626name = "markdown"
782name = "markdown"
627scope = "source.md"
783scope = "source.md"
628injection-regex = "md|markdown"
784injection-regex = "md|markdown"
629file-types = ["md"]
785file-types = ["md"]
630roots = []
786roots = []
631−
632indent = { tab-width = 2, unit = " " }
787indent = { tab-width = 2, unit = " " }
633
788
789+[[grammar]]
790+name = "markdown"
791+source = { git = "https://github.com/MDeiml/tree-sitter-markdown", rev = "ad8c32917a16dfbb387d1da567bf0c3fb6fffde2" }
792+
634[[language]]
793[[language]]
635name = "dart"
794name = "dart"
636scope = "source.dart"
795scope = "source.dart"
@@ -641,6 +800,10 @@ comment-token = "//"
641language-server = { command = "dart", args = ["language-server", "--client-id=helix"] }
800language-server = { command = "dart", args = ["language-server", "--client-id=helix"] }
642indent = { tab-width = 2, unit = " " }
801indent = { tab-width = 2, unit = " " }
643
802
803+[[grammar]]
804+name = "dart"
805+source = { git = "https://github.com/UserNobody14/tree-sitter-dart", rev = "6a25376685d1d47968c2cef06d4db8d84a70025e" }
806+
644[[language]]
807[[language]]
645name = "scala"
808name = "scala"
646scope = "source.scala"
809scope = "source.scala"
@@ -650,6 +813,10 @@ comment-token = "//"
650indent = { tab-width = 2, unit = " " }
813indent = { tab-width = 2, unit = " " }
651language-server = { command = "metals" }
814language-server = { command = "metals" }
652
815
816+[[grammar]]
817+name = "scala"
818+source = { git = "https://github.com/tree-sitter/tree-sitter-scala", rev = "0a3dd53a7fc4b352a538397d054380aaa28be54c" }
819+
653[[language]]
820[[language]]
654name = "dockerfile"
821name = "dockerfile"
655scope = "source.dockerfile"
822scope = "source.dockerfile"
@@ -660,6 +827,10 @@ comment-token = "#"
660indent = { tab-width = 2, unit = " " }
827indent = { tab-width = 2, unit = " " }
661language-server = { command = "docker-langserver", args = ["--stdio"] }
828language-server = { command = "docker-langserver", args = ["--stdio"] }
662
829
830+[[grammar]]
831+name = "dockerfile"
832+source = { git = "https://github.com/camdencheek/tree-sitter-dockerfile", rev = "7af32bc04a66ab196f5b9f92ac471f29372ae2ce" }
833+
663[[language]]
834[[language]]
664name = "git-commit"
835name = "git-commit"
665scope = "git.commitmsg"
836scope = "git.commitmsg"
@@ -668,6 +839,10 @@ file-types = ["COMMIT_EDITMSG"]
668comment-token = "#"
839comment-token = "#"
669indent = { tab-width = 2, unit = " " }
840indent = { tab-width = 2, unit = " " }
670
841
842+[[grammar]]
843+name = "git-commit"
844+source = { git = "https://github.com/the-mikedavis/tree-sitter-git-commit", rev = "066e395e1107df17183cf3ae4230f1a1406cc972" }
845+
671[[language]]
846[[language]]
672name = "git-diff"
847name = "git-diff"
673scope = "source.diff"
848scope = "source.diff"
@@ -677,6 +852,10 @@ injection-regex = "diff"
677comment-token = "#"
852comment-token = "#"
678indent = { tab-width = 2, unit = " " }
853indent = { tab-width = 2, unit = " " }
679
854
855+[[grammar]]
856+name = "git-diff"
857+source = { git = "https://github.com/the-mikedavis/tree-sitter-git-diff", rev = "c12e6ecb54485f764250556ffd7ccb18f8e2942b" }
858+
680[[language]]
859[[language]]
681name = "git-rebase"
860name = "git-rebase"
682scope = "source.gitrebase"
861scope = "source.gitrebase"
@@ -686,6 +865,10 @@ injection-regex = "git-rebase"
686comment-token = "#"
865comment-token = "#"
687indent = { tab-width = 2, unit = " " }
866indent = { tab-width = 2, unit = " " }
688
867
868+[[grammar]]
869+name = "git-rebase"
870+source = { git = "https://github.com/the-mikedavis/tree-sitter-git-rebase", rev = "332dc528f27044bc4427024dbb33e6941fc131f2" }
871+
689[[language]]
872[[language]]
690name = "regex"
873name = "regex"
691scope = "source.regex"
874scope = "source.regex"
@@ -693,6 +876,10 @@ injection-regex = "regex"
693file-types = ["regex"]
876file-types = ["regex"]
694roots = []
877roots = []
695
878
879+[[grammar]]
880+name = "regex"
881+source = { git = "https://github.com/tree-sitter/tree-sitter-regex", rev = "e1cfca3c79896ff79842f057ea13e529b66af636" }
882+
696[[language]]
883[[language]]
697name = "git-config"
884name = "git-config"
698scope = "source.gitconfig"
885scope = "source.gitconfig"
@@ -703,6 +890,10 @@ injection-regex = "git-config"
703comment-token = "#"
890comment-token = "#"
704indent = { tab-width = 4, unit = "\t" }
891indent = { tab-width = 4, unit = "\t" }
705
892
893+[[grammar]]
894+name = "git-config"
895+source = { git = "https://github.com/the-mikedavis/tree-sitter-git-config", rev = "0e4f0baf90b57e5aeb62dcdbf03062c6315d43ea" }
896+
706[[language]]
897[[language]]
707name = "graphql"
898name = "graphql"
708scope = "source.graphql"
899scope = "source.graphql"
@@ -711,6 +902,10 @@ file-types = ["gql", "graphql"]
711roots = []
902roots = []
712indent = { tab-width = 2, unit = " " }
903indent = { tab-width = 2, unit = " " }
713
904
905+[[grammar]]
906+name = "graphql"
907+source = { git = "https://github.com/bkegley/tree-sitter-graphql", rev = "5e66e961eee421786bdda8495ed1db045e06b5fe" }
908+
714[[language]]
909[[language]]
715name = "elm"
910name = "elm"
716scope = "source.elm"
911scope = "source.elm"
@@ -722,6 +917,10 @@ comment-token = "--"
722language-server = { command = "elm-language-server" }
917language-server = { command = "elm-language-server" }
723indent = { tab-width = 4, unit = " " }
918indent = { tab-width = 4, unit = " " }
724
919
920+[[grammar]]
921+name = "elm"
922+source = { git = "https://github.com/elm-tooling/tree-sitter-elm", rev = "bd50ccf66b42c55252ac8efc1086af4ac6bab8cd" }
923+
725[[language]]
924[[language]]
726name = "iex"
925name = "iex"
727scope = "source.iex"
926scope = "source.iex"
@@ -729,6 +928,10 @@ injection-regex = "iex"
729file-types = ["iex"]
928file-types = ["iex"]
730roots = []
929roots = []
731
930
931+[[grammar]]
932+name = "iex"
933+source = { git = "https://github.com/elixir-lang/tree-sitter-iex", rev = "39f20bb51f502e32058684e893c0c0b00bb2332c" }
934+
732[[language]]
935[[language]]
733name = "rescript"
936name = "rescript"
734scope = "source.rescript"
937scope = "source.rescript"
@@ -740,6 +943,10 @@ comment-token = "//"
740language-server = { command = "rescript-language-server", args = ["--stdio"] }
943language-server = { command = "rescript-language-server", args = ["--stdio"] }
741indent = { tab-width = 2, unit = " " }
944indent = { tab-width = 2, unit = " " }
742
945
946+[[grammar]]
947+name = "rescript"
948+source = { git = "https://github.com/jaredramirez/tree-sitter-rescript", rev = "789a171d9bcf73f6d76e67aca39ed14a75375b04" }
949+
743[[language]]
950[[language]]
744name = "erlang"
951name = "erlang"
745scope = "source.erlang"
952scope = "source.erlang"
@@ -749,6 +956,10 @@ roots = ["rebar.config"]
749comment-token = "%%"
956comment-token = "%%"
750indent = { tab-width = 4, unit = " " }
957indent = { tab-width = 4, unit = " " }
751
958
959+[[grammar]]
960+name = "erlang"
961+source = { git = "https://github.com/the-mikedavis/tree-sitter-erlang", rev = "86985bde399c5f40b00bc75f7ab70a6c69a5f9c3" }
962+
752[[language]]
963[[language]]
753name = "kotlin"
964name = "kotlin"
754scope = "source.kotlin"
965scope = "source.kotlin"
@@ -758,6 +969,10 @@ comment-token = "//"
758indent = { tab-width = 4, unit = " " }
969indent = { tab-width = 4, unit = " " }
759language-server = { command = "kotlin-language-server" }
970language-server = { command = "kotlin-language-server" }
760
971
972+[[grammar]]
973+name = "kotlin"
974+source = { git = "https://github.com/fwcd/tree-sitter-kotlin", rev = "a4f71eb9b8c9b19ded3e0e9470be4b1b77c2b569" }
975+
761[[language]]
976[[language]]
762name = "hcl"
977name = "hcl"
763scope = "source.hcl"
978scope = "source.hcl"
@@ -768,3 +983,7 @@ comment-token = "#"
768indent = { tab-width = 2, unit = " " }
983indent = { tab-width = 2, unit = " " }
769language-server = { command = "terraform-ls", args = ["serve"] }
984language-server = { command = "terraform-ls", args = ["serve"] }
770auto-format = true
985auto-format = true
986+
987+[[grammar]]
988+name = "hcl"
989+source = { git = "https://github.com/MichaHoffmann/tree-sitter-hcl", rev = "3cb7fc28247efbcb2973b97e71c78838ad98a583" }