diff options
| author | Stevan Milic <stevan.milic@tradecore.com> | 2021-09-02 13:24:37 +0200 |
|---|---|---|
| committer | Stephan Seitz <stephan.seitz@fau.de> | 2021-09-04 04:36:30 +0200 |
| commit | 8c105dedec9c6671697b5e68cd96d34a726db76d (patch) | |
| tree | d0e4178242bdac52fbe2957212708e1efed4f0ea /queries/scala | |
| parent | Update scala highlights (diff) | |
| download | nvim-treesitter-8c105dedec9c6671697b5e68cd96d34a726db76d.tar nvim-treesitter-8c105dedec9c6671697b5e68cd96d34a726db76d.tar.gz nvim-treesitter-8c105dedec9c6671697b5e68cd96d34a726db76d.tar.bz2 nvim-treesitter-8c105dedec9c6671697b5e68cd96d34a726db76d.tar.lz nvim-treesitter-8c105dedec9c6671697b5e68cd96d34a726db76d.tar.xz nvim-treesitter-8c105dedec9c6671697b5e68cd96d34a726db76d.tar.zst nvim-treesitter-8c105dedec9c6671697b5e68cd96d34a726db76d.zip | |
Add scala folds
Diffstat (limited to 'queries/scala')
| -rw-r--r-- | queries/scala/folds.scm | 14 | ||||
| -rw-r--r-- | queries/scala/highlights.scm | 5 |
2 files changed, 17 insertions, 2 deletions
diff --git a/queries/scala/folds.scm b/queries/scala/folds.scm new file mode 100644 index 000000000..1eb9089e3 --- /dev/null +++ b/queries/scala/folds.scm @@ -0,0 +1,14 @@ +(call_expression (block) @fold) + +[(class_definition) + (trait_definition) + (object_definition) + (function_definition) + (import_declaration) + + (while_expression) + (do_while_expression) + (for_expression) + (try_expression) + (match_expression) +] @fold diff --git a/queries/scala/highlights.scm b/queries/scala/highlights.scm index a7546fa49..6f47babb3 100644 --- a/queries/scala/highlights.scm +++ b/queries/scala/highlights.scm @@ -7,12 +7,14 @@ ((identifier) @variable.builtin (#match? @variable.builtin "^this$")) +(interpolation) @none + ; Assume other uppercase names constants. ; NOTE: In order to distinguish constants we highlight ; all the identifiers that are uppercased. But this solution ; is not suitable for all occurences e.g. it will highlight ; an uppercased method as a constant if used with no params. -; Introducing highlighting for those specifi cases, is probably +; Introducing highlightning for those specific cases, is probably ; best way to resolve the issue. ((identifier) @constant (#match? @constant "^[A-Z]")) @@ -115,7 +117,6 @@ ] @string (interpolation "$" @punctuation.special) -(interpolation (identifier) @variable) ;; keywords |
