diff options
| author | Christian Clason <c.clason@uni-graz.at> | 2026-08-05 17:09:43 +0200 |
|---|---|---|
| committer | Christian Clason <ch.clason+github@icloud.com> | 2026-08-05 19:21:39 +0200 |
| commit | 3d3321b560a63ff92a8692401f303a5123336b86 (patch) | |
| tree | d799251ab60b666100263b964f7675203d0a0ccc | |
| parent | bot(parsers): update gnuplot (diff) | |
| download | nvim-treesitter-3d3321b560a63ff92a8692401f303a5123336b86.tar nvim-treesitter-3d3321b560a63ff92a8692401f303a5123336b86.tar.gz nvim-treesitter-3d3321b560a63ff92a8692401f303a5123336b86.tar.bz2 nvim-treesitter-3d3321b560a63ff92a8692401f303a5123336b86.tar.lz nvim-treesitter-3d3321b560a63ff92a8692401f303a5123336b86.tar.xz nvim-treesitter-3d3321b560a63ff92a8692401f303a5123336b86.tar.zst nvim-treesitter-3d3321b560a63ff92a8692401f303a5123336b86.zip | |
feat(scala)!: update parser and queries
Also add indents queries from upstream.
Breaking change: `(end)` node replaced by scanner-lexed `(end_marker)`
| -rw-r--r-- | SUPPORTED_LANGUAGES.md | 2 | ||||
| -rw-r--r-- | lua/nvim-treesitter/parsers.lua | 2 | ||||
| -rw-r--r-- | runtime/queries/scala/highlights.scm | 3 | ||||
| -rw-r--r-- | runtime/queries/scala/indents.scm | 32 |
4 files changed, 36 insertions, 3 deletions
diff --git a/SUPPORTED_LANGUAGES.md b/SUPPORTED_LANGUAGES.md index 4da971edf..ee5cca6bf 100644 --- a/SUPPORTED_LANGUAGES.md +++ b/SUPPORTED_LANGUAGES.md @@ -250,7 +250,7 @@ jsx (queries only)[^jsx] | unstable | `HFIJ ` | @steelsojka [ruby](https://github.com/tree-sitter/tree-sitter-ruby) | unstable | `HFIJL` | @TravonteD [runescript](https://github.com/2004Scape/tree-sitter-runescript) | unstable | `H J ` | @2004Scape [rust](https://github.com/tree-sitter/tree-sitter-rust) | unstable | `HFIJL` | @amaanq -[scala](https://github.com/tree-sitter/tree-sitter-scala) | unstable | `HF JL` | @stevanmilic +[scala](https://github.com/tree-sitter/tree-sitter-scala) | unstable | `HFIJL` | @stevanmilic [scfg](https://github.com/rockorager/tree-sitter-scfg) | unstable | `H J ` | @WhyNotHugo [scheme](https://github.com/6cdh/tree-sitter-scheme) | unstable | `HF J ` | [scss](https://github.com/serenadeai/tree-sitter-scss) | unstable | `HFIJ ` | @elianiva diff --git a/lua/nvim-treesitter/parsers.lua b/lua/nvim-treesitter/parsers.lua index e55d29a89..9b3627fd8 100644 --- a/lua/nvim-treesitter/parsers.lua +++ b/lua/nvim-treesitter/parsers.lua @@ -1957,7 +1957,7 @@ return { }, scala = { install_info = { - revision = '5877eb9f55dc396da0d9a3e890df01f5c4810233', + revision = 'bf9ac14f8b95c8ea341d830165de5a66e0f6664b', url = 'https://github.com/tree-sitter/tree-sitter-scala', }, maintainers = { '@stevanmilic' }, diff --git a/runtime/queries/scala/highlights.scm b/runtime/queries/scala/highlights.scm index 7e623aebc..0c5cf092d 100644 --- a/runtime/queries/scala/highlights.scm +++ b/runtime/queries/scala/highlights.scm @@ -183,11 +183,12 @@ "with" "given" "using" - "end" "implicit" "extension" ] @keyword +(end_marker) @keyword + [ "enum" "class" diff --git a/runtime/queries/scala/indents.scm b/runtime/queries/scala/indents.scm new file mode 100644 index 000000000..e40d6f487 --- /dev/null +++ b/runtime/queries/scala/indents.scm @@ -0,0 +1,32 @@ +[ + (template_body) + (block) + (parameters) + (arguments) + (match_expression) + (splice_expression) + (import_declaration) + (function_definition) + "match" + ":" + "=" +] @indent.begin + +(ERROR + ":") @indent.begin + +(ERROR + "=") @indent.begin + +(arguments + ")" @indent.end) + +"}" @indent.end + +(end_marker) @indent.end + +[ + ")" + "]" + "}" +] @indent.branch |
