mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-18 03:10:04 -04:00
folds support and somewhat better indents for ruby
This commit is contained in:
parent
065ff440d4
commit
11ede1c0d2
2 changed files with 26 additions and 0 deletions
12
queries/ruby/folds.scm
Normal file
12
queries/ruby/folds.scm
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
[
|
||||||
|
(method)
|
||||||
|
(singleton_method)
|
||||||
|
(class)
|
||||||
|
(module)
|
||||||
|
(if)
|
||||||
|
(else)
|
||||||
|
(case)
|
||||||
|
(do_block)
|
||||||
|
(singleton_class)
|
||||||
|
(lambda)
|
||||||
|
] @fold
|
||||||
|
|
@ -1,12 +1,26 @@
|
||||||
[
|
[
|
||||||
(class)
|
(class)
|
||||||
(method)
|
(method)
|
||||||
|
(singleton_method)
|
||||||
(module)
|
(module)
|
||||||
(call)
|
(call)
|
||||||
(if)
|
(if)
|
||||||
|
(block)
|
||||||
|
(do_block)
|
||||||
|
(hash)
|
||||||
|
(array)
|
||||||
|
(argument_list)
|
||||||
|
(case)
|
||||||
] @indent
|
] @indent
|
||||||
|
|
||||||
[
|
[
|
||||||
|
"("
|
||||||
|
")"
|
||||||
|
"{"
|
||||||
|
"}"
|
||||||
|
"["
|
||||||
|
"]"
|
||||||
|
(when)
|
||||||
(elsif)
|
(elsif)
|
||||||
"end"
|
"end"
|
||||||
] @branch
|
] @branch
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue