diff options
| author | Amaan Qureshi <amaanq12@gmail.com> | 2023-03-09 19:52:39 -0500 |
|---|---|---|
| committer | Amaan Qureshi <amaanq12@gmail.com> | 2023-03-10 03:38:23 -0500 |
| commit | 9c7fa77f1443fd215c26c7c5f58484e2d4aeff0f (patch) | |
| tree | e1c00a6111a6d7408053fec961fd083fec8f7939 /queries/julia | |
| parent | highlights(prql): update to prql 0.6.0 (diff) | |
| download | nvim-treesitter-9c7fa77f1443fd215c26c7c5f58484e2d4aeff0f.tar nvim-treesitter-9c7fa77f1443fd215c26c7c5f58484e2d4aeff0f.tar.gz nvim-treesitter-9c7fa77f1443fd215c26c7c5f58484e2d4aeff0f.tar.bz2 nvim-treesitter-9c7fa77f1443fd215c26c7c5f58484e2d4aeff0f.tar.lz nvim-treesitter-9c7fa77f1443fd215c26c7c5f58484e2d4aeff0f.tar.xz nvim-treesitter-9c7fa77f1443fd215c26c7c5f58484e2d4aeff0f.tar.zst nvim-treesitter-9c7fa77f1443fd215c26c7c5f58484e2d4aeff0f.zip | |
fix(julia): refactor some operators and punctuation
Diffstat (limited to 'queries/julia')
| -rw-r--r-- | queries/julia/highlights.scm | 37 |
1 files changed, 21 insertions, 16 deletions
diff --git a/queries/julia/highlights.scm b/queries/julia/highlights.scm index 6044e66de..54ad8f626 100644 --- a/queries/julia/highlights.scm +++ b/queries/julia/highlights.scm @@ -19,10 +19,9 @@ (identifier) @field .) - ;;; Function names -;; definitions +;; Definitions (function_definition name: (identifier) @function) @@ -57,9 +56,7 @@ (identifier) @parameter) (typed_parameter - parameter: (identifier) @parameter - type: (_) @type) -(typed_parameter + parameter: (identifier)? @parameter type: (_) @type) (function_expression @@ -111,9 +108,9 @@ "local" "macro" "struct" + "end" ] @keyword -"end" @keyword (compound_statement ["begin" "end"] @keyword) @@ -125,9 +122,9 @@ (if_statement ["if" "end"] @conditional) (elseif_clause - ["elseif"] @conditional) + "elseif" @conditional) (else_clause - ["else"] @conditional) + "else" @conditional) (if_clause "if" @conditional) ; `if` clause in comprehensions (ternary_expression @@ -167,8 +164,6 @@ ["function" "end"] @keyword.function) (do_clause ["do" "end"] @keyword.function) -(function_expression - "->" @keyword.function) (return_statement "return" @keyword.return) @@ -180,25 +175,35 @@ ;;; Operators & Punctuation -(operator) @operator +[ + "=" + "∈" + (operator) +] @operator (adjoint_expression "'" @operator) (range_expression ":" @operator) -(slurp_parameter "..." @operator) -(splat_expression "..." @operator) ((operator) @keyword.operator (#any-of? @keyword.operator "in" "isa")) (for_binding "in" @keyword.operator) -(for_binding ["=" "∈"] @operator) (where_clause "where" @keyword.operator) (where_expression "where" @keyword.operator) -["." "::"] @operator +[ + "," + "." + ";" + "::" + "->" +] @punctuation.delimiter + +[ + "..." +] @punctuation.special -["," ";"] @punctuation.delimiter ["(" ")" "[" "]" "{" "}"] @punctuation.bracket |
