mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-01 19:17:02 -04:00
Add folds for Go
The default behavior in which `@scope` captures were folded resulted in toplevel fold for an entire source file, which was mildly irritating.
This commit is contained in:
parent
dd7900fc44
commit
62551bca4e
1 changed files with 13 additions and 0 deletions
13
queries/go/folds.scm
Normal file
13
queries/go/folds.scm
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
[
|
||||
(const_declaration)
|
||||
(expression_switch_statement)
|
||||
(for_statement)
|
||||
(func_literal)
|
||||
(function_declaration)
|
||||
(if_statement)
|
||||
(import_declaration)
|
||||
(method_declaration)
|
||||
(type_declaration)
|
||||
(var_declaration)
|
||||
] @fold
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue