on master help sign in
Add indentation queries for golang.
31d4108Blaž Hrastnik
README.md+1−1
@@ -24,7 +24,7 @@ It's a terminal-based editor first, but I'd like to explore a custom renderer
24
24
25# Installation
25# Installation
26
26
27−Note: Only the Rust syntax has indentation definitions at the moment.
27+Note: Only Rust and Golang have indentation definitions at the moment.
28
28
29We provide packaging for various distributions, but here's a quick method to
29We provide packaging for various distributions, but here's a quick method to
30build from source.
30build from source.
runtime/queries/go/indents.tomlnew file+21
@@ -0,0 +1,21 @@
1+indent = [
2+ "import_declaration",
3+ "const_declaration",
4+ "var_declaration",
5+ "function_declaration",
6+ "method_declaration",
7+ "composite_literal",
8+ "func_literal",
9+ "literal_value",
10+ "expression_case",
11+ "default_case",
12+ "argument_list",
13+ "block"
14+]
15+
16+outdent = [
17+ "case",
18+ "}",
19+ "]",
20+ ")"
21+]