Support bash autoindenting (#24156)

Creates an indents.scm file for bash and adds regexes for
`{increase,decrease}_indent_pattern` in
`crates/languages/src/bash/config.toml`
so that autoindent works as expected in bash

Note that this PR does not attempt to handle all cases where indenting
might be desired in bash. I am aiming to support ~80% of what people
want while avoiding the more gnarly/edge cases like indented blocks in
case statements and indenting for associative arrays.
This is done with the explicit hope that someone (possibly from the
community) more familiar with and passionate about bash can come through
at a later date and handle those cases

Closes #23628

Release Notes:

- Add basic support for autoindent functionality in bash/shell files
This commit is contained in:
Ben Kunkle 2025-02-03 18:37:52 -06:00 committed by GitHub
parent dfd11c3d3b
commit b6e680ea3d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 130 additions and 2 deletions

View file

@ -93,3 +93,4 @@ tree-sitter-python.workspace = true
tree-sitter-go.workspace = true
tree-sitter-c.workspace = true
tree-sitter-css.workspace = true
tree-sitter-bash.workspace = true