summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--languages.toml2
-rw-r--r--runtime/queries/julia/highlights.scm23
-rw-r--r--runtime/queries/julia/injections.scm11
3 files changed, 22 insertions, 14 deletions
diff --git a/languages.toml b/languages.toml
index cfacf27f..38af1310 100644
--- a/languages.toml
+++ b/languages.toml
@@ -571,7 +571,7 @@ indent = { tab-width = 4, unit = " " }
[[grammar]]
name = "julia"
-source = { git = "https://github.com/tree-sitter/tree-sitter-julia", rev = "12ea597262125fc22fd2e91aa953ac69b19c26ca" }
+source = { git = "https://github.com/tree-sitter/tree-sitter-julia", rev = "fc60b7cce87da7a1b7f8cb0f9371c3dc8b684500" }
[[language]]
name = "java"
diff --git a/runtime/queries/julia/highlights.scm b/runtime/queries/julia/highlights.scm
index 7c447985..31848888 100644
--- a/runtime/queries/julia/highlights.scm
+++ b/runtime/queries/julia/highlights.scm
@@ -1,10 +1,7 @@
-[
- (triple_string)
- (string)
-] @string
+(string_literal) @string
-(string
+(prefixed_string_literal
prefix: (identifier) @constant.builtin)
(macro_identifier) @function.macro
@@ -80,7 +77,9 @@
(struct_definition
name: (identifier) @type)
-(number) @constant.numeric.integer
+(integer_literal) @constant.numeric.integer
+(float_literal) @constant.numeric.float
+
(range_expression
(identifier) @constant.numeric.integer
(eq? @constant.numeric.integer "end"))
@@ -89,7 +88,10 @@
(identifier) @constant.numeric.integer
(eq? @constant.numeric.integer "end")))
(coefficient_expression
- (number)
+ [
+ (integer_literal)
+ (float_literal)
+ ]
(identifier) @constant.builtin)
;; TODO: operators.
@@ -117,7 +119,10 @@
(function_definition ["function" "end"] @keyword.function)
-(comment) @comment
+[
+ (line_comment)
+ (block_comment)
+] @comment
[
"const"
@@ -171,7 +176,7 @@
(((identifier) @constant.builtin.boolean) (#eq? @constant.builtin.boolean "false"))
-["::" ":" "." "," "..." "!"] @punctuation.delimiter
+["::" ":" "." "," "..."] @punctuation.delimiter
["[" "]" "(" ")" "{" "}"] @punctuation.bracket
["="] @operator
diff --git a/runtime/queries/julia/injections.scm b/runtime/queries/julia/injections.scm
index 1c1e804e..3eab231f 100644
--- a/runtime/queries/julia/injections.scm
+++ b/runtime/queries/julia/injections.scm
@@ -1,5 +1,8 @@
-((triple_string) @injection.content
- (#set! injection.language "markdown"))
+; ((string_literal) @injection.content
+; (#set! injection.language "markdown"))
-((comment) @injection.content
- (#set! injection.language "comment"))
+; ((line_comment) @injection.content
+; (#set! injection.language "comment"))
+
+; ((block_comment) @injection.content
+; (#set! injection.language "comment"))