aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPau Ruiz Safont <unduthegun@gmail.com>2020-10-19 22:45:56 +0100
committerStephan Seitz <stephan.lauf@yahoo.de>2020-10-20 10:06:44 +0200
commitd7e384a092be52a69d8c41d736a0590a2c21113b (patch)
tree900b0537cb4804508a7ba9e5e0d52e6ff678ffb3
parentFix #595, #583: do not set defaults for highlights that have no default highl... (diff)
downloadnvim-treesitter-d7e384a092be52a69d8c41d736a0590a2c21113b.tar
nvim-treesitter-d7e384a092be52a69d8c41d736a0590a2c21113b.tar.gz
nvim-treesitter-d7e384a092be52a69d8c41d736a0590a2c21113b.tar.bz2
nvim-treesitter-d7e384a092be52a69d8c41d736a0590a2c21113b.tar.lz
nvim-treesitter-d7e384a092be52a69d8c41d736a0590a2c21113b.tar.xz
nvim-treesitter-d7e384a092be52a69d8c41d736a0590a2c21113b.tar.zst
nvim-treesitter-d7e384a092be52a69d8c41d736a0590a2c21113b.zip
feat(ocamllex): use injections for ocaml
-rw-r--r--queries/ocamllex/highlights.scm6
-rw-r--r--queries/ocamllex/injections.scm2
2 files changed, 6 insertions, 2 deletions
diff --git a/queries/ocamllex/highlights.scm b/queries/ocamllex/highlights.scm
index eb72102a7..513316159 100644
--- a/queries/ocamllex/highlights.scm
+++ b/queries/ocamllex/highlights.scm
@@ -3,11 +3,13 @@
(lexer_entry_name) @function
-["as" "let" "parse" "rule"] @keyword
+["as" "let" "and" "parse" "rule"] @keyword
[(eof) (character)] @character
(string) @string
+(ocaml) @none
+
(character_range "-" @operator)
(character_set "^" @operator)
(regexp_alternative ["|"] @operator)
@@ -16,7 +18,7 @@
(regexp_repetition ["*"] @operator)
(regexp_strict_repetition ["+"] @operator)
-(action ["{" "}"] @punctuation.special) @embedded
+(action ["{" "}"] @punctuation.special)
(character_set ["[" "]"] @punctuation.bracket)
(parenthesized_regexp ["(" ")"] @punctuation.bracket)
diff --git a/queries/ocamllex/injections.scm b/queries/ocamllex/injections.scm
new file mode 100644
index 000000000..65a9bdd50
--- /dev/null
+++ b/queries/ocamllex/injections.scm
@@ -0,0 +1,2 @@
+((ocaml) @injection
+ (#set! "lang" "ocaml"))