mirror of
https://github.com/zed-industries/zed.git
synced 2025-02-02 00:06:08 +00:00
ocaml: Add Dune language support (#17886)
This uses my fork of the dune tree-sitter grammar to include the generated files Release Notes: - N/A
This commit is contained in:
parent
469dfe759c
commit
10cfaecffa
4 changed files with 19 additions and 0 deletions
|
@ -19,3 +19,7 @@ path = "grammars/ocaml"
|
|||
repository = "https://github.com/tree-sitter/tree-sitter-ocaml"
|
||||
commit = "0b12614ded3ec7ed7ab7933a9ba4f695ba4c342e"
|
||||
path = "grammars/interface"
|
||||
|
||||
[grammars.dune]
|
||||
repository = "https://github.com/WHForks/tree-sitter-dune"
|
||||
commit = "b3f7882e1b9a1d8811011bf6f0de1c74c9c93949"
|
||||
|
|
8
extensions/ocaml/languages/dune/config.toml
Normal file
8
extensions/ocaml/languages/dune/config.toml
Normal file
|
@ -0,0 +1,8 @@
|
|||
name = "Dune"
|
||||
grammar = "dune"
|
||||
path_suffixes = ["dune", "dune-project"]
|
||||
brackets = [
|
||||
{ start = "(", end = ")", close = true, newline = true },
|
||||
{ start = "\"", end = "\"", close = true, newline = false, not_in = ["string"] }
|
||||
]
|
||||
tab_size = 2
|
5
extensions/ocaml/languages/dune/highlights.scm
Normal file
5
extensions/ocaml/languages/dune/highlights.scm
Normal file
|
@ -0,0 +1,5 @@
|
|||
(stanza_name) @function
|
||||
(field_name) @property
|
||||
(quoted_string) @string
|
||||
(multiline_string) @string
|
||||
(action_name) @keyword
|
2
extensions/ocaml/languages/dune/injections.scm
Normal file
2
extensions/ocaml/languages/dune/injections.scm
Normal file
|
@ -0,0 +1,2 @@
|
|||
((ocaml_syntax) @injection.content
|
||||
(#set! injection.language "ocaml"))
|
Loading…
Reference in a new issue