mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-01 11:06:54 -04:00
feat(bash): add indents query
It's pretty basic at the moment but already makes working with bash scripts way easier.
This commit is contained in:
parent
86cf4fb684
commit
4337799162
4 changed files with 105 additions and 1 deletions
32
runtime/queries/bash/indents.scm
Normal file
32
runtime/queries/bash/indents.scm
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
[
|
||||
(if_statement)
|
||||
(for_statement)
|
||||
(while_statement)
|
||||
(case_statement)
|
||||
(function_definition)
|
||||
(compound_statement)
|
||||
(subshell)
|
||||
(command_substitution)
|
||||
(do_group)
|
||||
(case_item)
|
||||
] @indent.begin
|
||||
|
||||
[
|
||||
"fi"
|
||||
"done"
|
||||
"esac"
|
||||
"}"
|
||||
")"
|
||||
"then"
|
||||
"do"
|
||||
(elif_clause)
|
||||
(else_clause)
|
||||
] @indent.branch
|
||||
|
||||
[
|
||||
"fi"
|
||||
"done"
|
||||
"esac"
|
||||
"}"
|
||||
")"
|
||||
] @indent.end
|
||||
Loading…
Add table
Add a link
Reference in a new issue