From a6108baec9455f223211b458e2328087e7fa3280 Mon Sep 17 00:00:00 2001 From: Blaž Hrastnik Date: Thu, 2 Sep 2021 14:58:57 +0900 Subject: Improve grammar definitions --- runtime/queries/lua/highlights.scm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'runtime/queries/lua') diff --git a/runtime/queries/lua/highlights.scm b/runtime/queries/lua/highlights.scm index 8e27a39a..4e68cd66 100644 --- a/runtime/queries/lua/highlights.scm +++ b/runtime/queries/lua/highlights.scm @@ -108,7 +108,7 @@ [ (false) (true) -] @boolean +] @constant.builtin.boolean (nil) @constant.builtin (spread) @constant ;; "..." ((identifier) @constant @@ -116,7 +116,7 @@ ;; Parameters (parameters - (identifier) @parameter) + (identifier) @variable.parameter) ; ;; Functions (function [(function_name) (identifier)] @function) @@ -139,8 +139,8 @@ (function_call [ - ((identifier) @variable (method) @method) - ((_) (method) @method) + ((identifier) @variable (method) @function.method) + ((_) (method) @function.method) (identifier) @function (field_expression (property_identifier) @function) ] -- cgit v1.2.3-70-g09d2 From 9b9c3c77f88af1ff798739aaa3303d563bbe8174 Mon Sep 17 00:00:00 2001 From: Blaž Hrastnik Date: Fri, 3 Sep 2021 10:39:30 +0900 Subject: runtime: Query improvements --- runtime/queries/c/highlights.scm | 2 +- runtime/queries/javascript/highlights.scm | 2 +- runtime/queries/lua/highlights.scm | 8 ++++---- runtime/queries/ruby/highlights.scm | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) (limited to 'runtime/queries/lua') diff --git a/runtime/queries/c/highlights.scm b/runtime/queries/c/highlights.scm index 258e07e7..2c42710f 100644 --- a/runtime/queries/c/highlights.scm +++ b/runtime/queries/c/highlights.scm @@ -61,7 +61,7 @@ (null) @constant (number_literal) @number -(char_literal) @number +(char_literal) @string (call_expression function: (identifier) @function) diff --git a/runtime/queries/javascript/highlights.scm b/runtime/queries/javascript/highlights.scm index a18c38d9..e29829bf 100644 --- a/runtime/queries/javascript/highlights.scm +++ b/runtime/queries/javascript/highlights.scm @@ -87,7 +87,7 @@ (template_string) ] @string -(regex) @string.special +(regex) @string.regexp (number) @number ; Tokens diff --git a/runtime/queries/lua/highlights.scm b/runtime/queries/lua/highlights.scm index 4e68cd66..756ab3b7 100644 --- a/runtime/queries/lua/highlights.scm +++ b/runtime/queries/lua/highlights.scm @@ -23,27 +23,27 @@ "for" "do" "end" -] @keyword.control.loop) +] @keyword.control.repeat) (for_in_statement [ "for" "do" "end" -] @keyword.control.loop) +] @keyword.control.repeat) (while_statement [ "while" "do" "end" -] @keyword.control.loop) +] @keyword.control.repeat) (repeat_statement [ "repeat" "until" -] @keyword.control.loop) +] @keyword.control.repeat) (do_statement [ diff --git a/runtime/queries/ruby/highlights.scm b/runtime/queries/ruby/highlights.scm index 7f296f3b..8617d6f0 100644 --- a/runtime/queries/ruby/highlights.scm +++ b/runtime/queries/ruby/highlights.scm @@ -100,7 +100,7 @@ (bare_symbol) ] @string.special.symbol -(regex) @string.special.regex +(regex) @string.regexp (escape_sequence) @escape [ -- cgit v1.2.3-70-g09d2 From d85a8adb2747e25589de82d821cd0c4e2dd244f5 Mon Sep 17 00:00:00 2001 From: Blaž Hrastnik Date: Mon, 6 Sep 2021 14:33:02 +0900 Subject: Improve highlighting scopes --- runtime/queries/haskell/highlights.scm | 14 ++++++++------ runtime/queries/lua/highlights.scm | 2 +- runtime/queries/ocaml/highlights.scm | 4 ++-- 3 files changed, 11 insertions(+), 9 deletions(-) (limited to 'runtime/queries/lua') diff --git a/runtime/queries/haskell/highlights.scm b/runtime/queries/haskell/highlights.scm index ecaa2d2c..dada80b6 100644 --- a/runtime/queries/haskell/highlights.scm +++ b/runtime/queries/haskell/highlights.scm @@ -2,19 +2,19 @@ (operator) @operator (exp_name (constructor) @constructor) (constructor_operator) @operator -(module) @module_name +(module) @namespace (type) @type (type) @class (constructor) @constructor (pragma) @pragma (comment) @comment (signature name: (variable) @fun_type_name) -(function name: (variable) @fun_name) +(function name: (variable) @function) (constraint class: (class_name (type)) @class) (class (class_head class: (class_name (type)) @class)) (instance (instance_head class: (class_name (type)) @class)) -(integer) @literal -(exp_literal (float)) @literal +(integer) @number +(exp_literal (float)) @number (char) @literal (con_unit) @literal (con_list) @literal @@ -39,5 +39,7 @@ "do" @keyword "mdo" @keyword "rec" @keyword -"(" @paren -")" @paren +[ + "(" + ")" +] @punctuation.bracket diff --git a/runtime/queries/lua/highlights.scm b/runtime/queries/lua/highlights.scm index 756ab3b7..40c2be70 100644 --- a/runtime/queries/lua/highlights.scm +++ b/runtime/queries/lua/highlights.scm @@ -65,7 +65,7 @@ "not" "and" "or" -] @keyword.operator +] @operator [ "=" diff --git a/runtime/queries/ocaml/highlights.scm b/runtime/queries/ocaml/highlights.scm index 3bb42604..5554574d 100644 --- a/runtime/queries/ocaml/highlights.scm +++ b/runtime/queries/ocaml/highlights.scm @@ -60,7 +60,7 @@ [(number) (signed_number)] @number -(character) @character +(character) @constant.builtin.character (string) @string @@ -92,7 +92,7 @@ ["include" "open"] @include -["for" "to" "downto" "while" "do" "done"] @keyword.control.loop +["for" "to" "downto" "while" "do" "done"] @keyword.control.repeat ; Macros ;------- -- cgit v1.2.3-70-g09d2