diff options
| author | Ivo Dancet <ivo.dancet@gmail.com> | 2021-03-13 18:41:44 +0100 |
|---|---|---|
| committer | Thomas Vigouroux <tomvig38@gmail.com> | 2021-03-15 19:54:30 +0100 |
| commit | 11ede1c0d2ab30ca1b637e31892a12e042a73965 (patch) | |
| tree | ee20878139fd13d78a0df959a4e9f7c3e25588bb /queries/ruby | |
| parent | Rust: add mod_item to folds (diff) | |
| download | nvim-treesitter-11ede1c0d2ab30ca1b637e31892a12e042a73965.tar nvim-treesitter-11ede1c0d2ab30ca1b637e31892a12e042a73965.tar.gz nvim-treesitter-11ede1c0d2ab30ca1b637e31892a12e042a73965.tar.bz2 nvim-treesitter-11ede1c0d2ab30ca1b637e31892a12e042a73965.tar.lz nvim-treesitter-11ede1c0d2ab30ca1b637e31892a12e042a73965.tar.xz nvim-treesitter-11ede1c0d2ab30ca1b637e31892a12e042a73965.tar.zst nvim-treesitter-11ede1c0d2ab30ca1b637e31892a12e042a73965.zip | |
folds support and somewhat better indents for ruby
Diffstat (limited to 'queries/ruby')
| -rw-r--r-- | queries/ruby/folds.scm | 12 | ||||
| -rw-r--r-- | queries/ruby/indents.scm | 14 |
2 files changed, 26 insertions, 0 deletions
diff --git a/queries/ruby/folds.scm b/queries/ruby/folds.scm new file mode 100644 index 000000000..3a497b31b --- /dev/null +++ b/queries/ruby/folds.scm @@ -0,0 +1,12 @@ +[ + (method) + (singleton_method) + (class) + (module) + (if) + (else) + (case) + (do_block) + (singleton_class) + (lambda) +] @fold diff --git a/queries/ruby/indents.scm b/queries/ruby/indents.scm index 8f2d9dec9..16f21b6bd 100644 --- a/queries/ruby/indents.scm +++ b/queries/ruby/indents.scm @@ -1,12 +1,26 @@ [ (class) (method) + (singleton_method) (module) (call) (if) + (block) + (do_block) + (hash) + (array) + (argument_list) + (case) ] @indent [ + "(" + ")" + "{" + "}" + "[" + "]" + (when) (elsif) "end" ] @branch |
