diff options
author | JJ | 2023-03-26 22:06:48 +0000 |
---|---|---|
committer | GitHub | 2023-03-26 22:06:48 +0000 |
commit | c8fde8b6f99b07faca7e6f93162d887ee132e0f6 (patch) | |
tree | 5359d447c27125e9181cddcf5e8620d22d1b661c /runtime/queries/nim/indents.scm | |
parent | 5d7c90c5cfd6887fc0a43ee695d91f0166955a64 (diff) |
Initial Nim language support (#6123)
Diffstat (limited to 'runtime/queries/nim/indents.scm')
-rw-r--r-- | runtime/queries/nim/indents.scm | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/runtime/queries/nim/indents.scm b/runtime/queries/nim/indents.scm new file mode 100644 index 00000000..67743540 --- /dev/null +++ b/runtime/queries/nim/indents.scm @@ -0,0 +1,54 @@ +[ + (typeDef) + (ifStmt) + (whenStmt) + (elifStmt) + (elseStmt) + (ofBranch) ; note: not caseStmt + (whileStmt) + (tryStmt) + (tryExceptStmt) + (tryFinallyStmt) + (forStmt) + (blockStmt) + (staticStmt) + (deferStmt) + (asmStmt) + ; exprStmt? +] @indent +;; increase the indentation level + +[ + (ifStmt) + (whenStmt) + (elifStmt) + (elseStmt) + (ofBranch) ; note: not caseStmt + (whileStmt) + (tryStmt) + (tryExceptStmt) + (tryFinallyStmt) + (forStmt) + (blockStmt) + (staticStmt) + (deferStmt) + (asmStmt) + ; exprStmt? +] @extend +;; ??? + +[ + (returnStmt) + (raiseStmt) + (yieldStmt) + (breakStmt) + (continueStmt) +] @extend.prevent-once +;; end a level of indentation while staying indented + +[ + ")" ; tuples + "]" ; arrays, seqs + "}" ; sets +] @outdent +;; end a level of indentation and unindent the line |