aboutsummaryrefslogtreecommitdiffstats
path: root/queries/go
diff options
context:
space:
mode:
authorClaudia Hardman <claudia.hardman@mattel.com>2020-10-31 15:51:24 -0400
committerStephan Seitz <stephan.lauf@yahoo.de>2020-10-31 23:11:23 +0100
commit62551bca4e7c817b4dde6d1a38893f3c8a733d89 (patch)
treec6413177aebd9d16880db208831db15c7ebb1d0c /queries/go
parentfix(languagetree): highlight children regardless of starting column (diff)
downloadnvim-treesitter-62551bca4e7c817b4dde6d1a38893f3c8a733d89.tar
nvim-treesitter-62551bca4e7c817b4dde6d1a38893f3c8a733d89.tar.gz
nvim-treesitter-62551bca4e7c817b4dde6d1a38893f3c8a733d89.tar.bz2
nvim-treesitter-62551bca4e7c817b4dde6d1a38893f3c8a733d89.tar.lz
nvim-treesitter-62551bca4e7c817b4dde6d1a38893f3c8a733d89.tar.xz
nvim-treesitter-62551bca4e7c817b4dde6d1a38893f3c8a733d89.tar.zst
nvim-treesitter-62551bca4e7c817b4dde6d1a38893f3c8a733d89.zip
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.
Diffstat (limited to 'queries/go')
-rw-r--r--queries/go/folds.scm13
1 files changed, 13 insertions, 0 deletions
diff --git a/queries/go/folds.scm b/queries/go/folds.scm
new file mode 100644
index 000000000..c79d45720
--- /dev/null
+++ b/queries/go/folds.scm
@@ -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
+