on master help sign in
Add indentation queries for golang.
commit31d41080edd216649d1db9ec7303561c58716d1d authorBlaž Hrastnik <blaz@mxxn.io> dateSat 15 May 2021, 01:34 (5 years ago) parent5e6b46e
2 files changed+22−1
README.md+1−1 runtime/queries/go/indents.toml+21
README.md+1−1
@@ -24,7 +24,7 @@ It's a terminal-based editor first, but I'd like to explore a custom renderer
2424
2525# Installation
2626
27−Note: Only the Rust syntax has indentation definitions at the moment.
27+Note: Only Rust and Golang have indentation definitions at the moment.
2828
2929We provide packaging for various distributions, but here's a quick method to
3030build 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+]