mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-16 02:10:15 -04:00
feat(ocamllex): use injections for ocaml
This commit is contained in:
parent
3160a19de3
commit
d7e384a092
2 changed files with 6 additions and 2 deletions
|
|
@ -3,11 +3,13 @@
|
||||||
|
|
||||||
(lexer_entry_name) @function
|
(lexer_entry_name) @function
|
||||||
|
|
||||||
["as" "let" "parse" "rule"] @keyword
|
["as" "let" "and" "parse" "rule"] @keyword
|
||||||
|
|
||||||
[(eof) (character)] @character
|
[(eof) (character)] @character
|
||||||
(string) @string
|
(string) @string
|
||||||
|
|
||||||
|
(ocaml) @none
|
||||||
|
|
||||||
(character_range "-" @operator)
|
(character_range "-" @operator)
|
||||||
(character_set "^" @operator)
|
(character_set "^" @operator)
|
||||||
(regexp_alternative ["|"] @operator)
|
(regexp_alternative ["|"] @operator)
|
||||||
|
|
@ -16,7 +18,7 @@
|
||||||
(regexp_repetition ["*"] @operator)
|
(regexp_repetition ["*"] @operator)
|
||||||
(regexp_strict_repetition ["+"] @operator)
|
(regexp_strict_repetition ["+"] @operator)
|
||||||
|
|
||||||
(action ["{" "}"] @punctuation.special) @embedded
|
(action ["{" "}"] @punctuation.special)
|
||||||
(character_set ["[" "]"] @punctuation.bracket)
|
(character_set ["[" "]"] @punctuation.bracket)
|
||||||
(parenthesized_regexp ["(" ")"] @punctuation.bracket)
|
(parenthesized_regexp ["(" ")"] @punctuation.bracket)
|
||||||
|
|
||||||
|
|
|
||||||
2
queries/ocamllex/injections.scm
Normal file
2
queries/ocamllex/injections.scm
Normal file
|
|
@ -0,0 +1,2 @@
|
||||||
|
((ocaml) @injection
|
||||||
|
(#set! "lang" "ocaml"))
|
||||||
Loading…
Add table
Add a link
Reference in a new issue