diff options
| author | Lewis Russell <lewis6991@gmail.com> | 2021-11-18 09:51:03 +0000 |
|---|---|---|
| committer | Stephan Seitz <stephan.seitz@fau.de> | 2021-11-23 10:02:06 +0100 |
| commit | 011ac894ec5b9e36563d8629fb7734f43ddb27a8 (patch) | |
| tree | de0b252b7705bfa4304c08cd389fed0814ae6f1c /queries/scala | |
| parent | 89fbb9b39e9ff4049c797397721d44facbd246df (diff) | |
Prefer lua-match over match
as string.find is much quicker than vim.regex:match*
Diffstat (limited to 'queries/scala')
| -rw-r--r-- | queries/scala/highlights.scm | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/queries/scala/highlights.scm b/queries/scala/highlights.scm index d8b39950..7cf5906b 100644 --- a/queries/scala/highlights.scm +++ b/queries/scala/highlights.scm @@ -5,7 +5,7 @@ (identifier) @variable ((identifier) @variable.builtin - (#match? @variable.builtin "^this$")) + (#lua-match? @variable.builtin "^this$")) (interpolation) @none @@ -16,7 +16,7 @@ ; an uppercased method as a constant if used with no params. ; Introducing highlighting for those specific cases, is probably ; best way to resolve the issue. -((identifier) @constant (#match? @constant "^[A-Z]")) +((identifier) @constant (#lua-match? @constant "^[A-Z]")) ;; types @@ -56,10 +56,10 @@ ((stable_identifier (identifier) @namespace)) ((import_declaration - path: (identifier) @type) (#match? @type "^[A-Z]")) -((stable_identifier (identifier) @type) (#match? @type "^[A-Z]")) + path: (identifier) @type) (#lua-match? @type "^[A-Z]")) +((stable_identifier (identifier) @type) (#lua-match? @type "^[A-Z]")) -((import_selectors (identifier) @type) (#match? @type "^[A-Z]")) +((import_selectors (identifier) @type) (#lua-match? @type "^[A-Z]")) ; method invocation @@ -73,14 +73,14 @@ ((call_expression function: (identifier) @constructor) - (#match? @constructor "^[A-Z]")) + (#lua-match? @constructor "^[A-Z]")) (generic_function function: (identifier) @function) ( (identifier) @function.builtin - (#match? @function.builtin "^super$") + (#lua-match? @function.builtin "^super$") ) ; function definitions @@ -96,7 +96,7 @@ (field_expression field: (identifier) @property) (field_expression value: (identifier) @type - (#match? @type "^[A-Z]")) + (#lua-match? @type "^[A-Z]")) (infix_expression operator: (identifier) @operator) (infix_expression operator: (operator_identifier) @operator) |
