diff options
author | JJ | 2024-02-29 01:49:10 +0000 |
---|---|---|
committer | GitHub | 2024-02-29 01:49:10 +0000 |
commit | e51a1e4e2ae99b8e1ad751e7dfa024a7d0e4ba8f (patch) | |
tree | cc8edd4fd6a809aa593716c46d15a515bcbbcd9e /runtime/queries/nim/indents.scm | |
parent | 1143f4795414c26382a5647f2be8c20a7a62ada4 (diff) |
Switch Nim tree-sitter queries to alaviss/tree-sitter-nim (#9722)
Diffstat (limited to 'runtime/queries/nim/indents.scm')
-rw-r--r-- | runtime/queries/nim/indents.scm | 83 |
1 files changed, 47 insertions, 36 deletions
diff --git a/runtime/queries/nim/indents.scm b/runtime/queries/nim/indents.scm index 67743540..3b302386 100644 --- a/runtime/queries/nim/indents.scm +++ b/runtime/queries/nim/indents.scm @@ -1,48 +1,59 @@ [ - (typeDef) - (ifStmt) - (whenStmt) - (elifStmt) - (elseStmt) - (ofBranch) ; note: not caseStmt - (whileStmt) - (tryStmt) - (tryExceptStmt) - (tryFinallyStmt) - (forStmt) - (blockStmt) - (staticStmt) - (deferStmt) - (asmStmt) - ; exprStmt? + (if) + (when) + (elif_branch) + (else_branch) + (of_branch) ; note: not case_statement + (block) + (while) + (for) + (try) + (except_branch) + (finally_branch) + (defer) + (static_statement) + (proc_declaration) + (func_declaration) + (iterator_declaration) + (converter_declaration) + (method_declaration) + (template_declaration) + (macro_declaration) + (symbol_declaration) ] @indent ;; increase the indentation level [ - (ifStmt) - (whenStmt) - (elifStmt) - (elseStmt) - (ofBranch) ; note: not caseStmt - (whileStmt) - (tryStmt) - (tryExceptStmt) - (tryFinallyStmt) - (forStmt) - (blockStmt) - (staticStmt) - (deferStmt) - (asmStmt) - ; exprStmt? + (if) + (when) + (elif_branch) + (else_branch) + (of_branch) ; note: not case_statement + (block) + (while) + (for) + (try) + (except_branch) + (finally_branch) + (defer) + (static_statement) + (proc_declaration) + (func_declaration) + (iterator_declaration) + (converter_declaration) + (method_declaration) + (template_declaration) + (macro_declaration) + (symbol_declaration) ] @extend ;; ??? [ - (returnStmt) - (raiseStmt) - (yieldStmt) - (breakStmt) - (continueStmt) + (return_statement) + (raise_statement) + (yield_statement) + (break_statement) + (continue_statement) ] @extend.prevent-once ;; end a level of indentation while staying indented |