From 40508bc20fe3c178089297565a7188ea7c0b91ad Mon Sep 17 00:00:00 2001 From: Vasili Markoukin <1istoobig@gmail.com> Date: Mon, 11 Mar 2024 00:10:44 +0300 Subject: [PATCH] Add queries for NeoVim indents --- queries/scala/indents.scm | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 queries/scala/indents.scm diff --git a/queries/scala/indents.scm b/queries/scala/indents.scm new file mode 100644 index 0000000..0345a47 --- /dev/null +++ b/queries/scala/indents.scm @@ -0,0 +1,30 @@ +; These indent queries adhere to nvim-tree-sytter syntax. +; See `nvim-tree-sitter-indentation-mod` vim help page. + +[ + (template_body) + (block) + (parameters) + (arguments) + (match_expression) + (splice_expression) + (import_declaration) + (function_definition) + (ERROR ":") + (ERROR "=") + ("match") + (":") + ("=") +] @indent.begin + +(arguments ")" @indent.end) + +"}" @indent.end + +"end" @indent.end + +[ + ")" + "]" + "}" +] @indent.branch