diff options
| author | Sergio A. Vargas <savargasqu+git@unal.edu.co> | 2022-02-07 16:16:58 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-02-07 22:16:58 +0100 |
| commit | 39142675775dc1b73ea34a0a87d6030274827a99 (patch) | |
| tree | c688312ef762bc339d7cadd7ee2008e93fc99d8a | |
| parent | feat(vim): highlight default parameters (diff) | |
| download | nvim-treesitter-39142675775dc1b73ea34a0a87d6030274827a99.tar nvim-treesitter-39142675775dc1b73ea34a0a87d6030274827a99.tar.gz nvim-treesitter-39142675775dc1b73ea34a0a87d6030274827a99.tar.bz2 nvim-treesitter-39142675775dc1b73ea34a0a87d6030274827a99.tar.lz nvim-treesitter-39142675775dc1b73ea34a0a87d6030274827a99.tar.xz nvim-treesitter-39142675775dc1b73ea34a0a87d6030274827a99.tar.zst nvim-treesitter-39142675775dc1b73ea34a0a87d6030274827a99.zip | |
feat(highlights/julia): Add missing highlights (#2464)
- Add highlights for:
+ command strings
+ abstract type definitions
+ module `end` delimiters
- Distinguish `:` in quotes and ranges (it's already highlighted
differently in ternary expressions).
| -rw-r--r-- | queries/julia/highlights.scm | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/queries/julia/highlights.scm b/queries/julia/highlights.scm index c20a37b39..a355367a5 100644 --- a/queries/julia/highlights.scm +++ b/queries/julia/highlights.scm @@ -9,6 +9,7 @@ (triple_string) (string) ] @string +(command_string) @string.special (string prefix: (identifier) @constant.builtin) @@ -83,6 +84,8 @@ (typed_expression (parameterized_identifier) @type .) +(abstract_definition + name: (identifier) @type) (struct_definition name: (identifier) @type) @@ -129,10 +132,11 @@ ] @comment [ + "abstract" "const" "macro" - "struct" "primitive" + "struct" "type" ] @keyword @@ -168,11 +172,11 @@ (export_statement ["export"] @include) -[ - "using" - "module" - "import" -] @include +(import_statement + ["import" "using"] @include) + +(module_definition + ["module" "end"] @include) ((identifier) @include (#eq? @include "baremodule")) @@ -180,5 +184,7 @@ (((identifier) @boolean) (#eq? @boolean "true")) (((identifier) @boolean) (#eq? @boolean "false")) -["::" ":" "." "," "..." "!"] @punctuation.delimiter +(range_expression ":" @operator) +(quote_expression ":" @symbol) +["::" "." "," "..." "!"] @punctuation.delimiter ["[" "]" "(" ")" "{" "}"] @punctuation.bracket |
