Skip to content

Commit 847c09d

Browse files
committed
Update README to note how shfmt indentation is controlled
This may preempt further questions similar to bash-lsp#1161.
1 parent 04a2cb3 commit 847c09d

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

README.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,10 @@ To be implemented:
2525

2626
### Dependencies
2727

28-
As a dependency, we recommend that you first install shellcheck [shellcheck][shellcheck] to enable linting: https://github.com/koalaman/shellcheck#installing . If shellcheck is installed, bash-language-server will automatically call it to provide linting and code analysis each time the file is updated (with debounce time of 500ms).
28+
As a dependency, we recommend that you first install [shellcheck][shellcheck] to enable linting:
29+
https://github.com/koalaman/shellcheck#installing . If `shellcheck` is installed,
30+
bash-language-server will automatically call it to provide linting and code analysis each time the
31+
file is updated (with debounce time of 500ms).
2932

3033
If you want your shell scripts to be formatted consistently, you can install [shfmt][shfmt]. If
3134
`shfmt` is installed then your documents will be formatted whenever you take the 'format document'
@@ -185,6 +188,13 @@ Using the built-in `eglot` lsp mode:
185188
(bash-ts-mode . eglot-ensure))
186189
```
187190

191+
## `shfmt` integration
192+
193+
The indentation used by `shfmt` is whatever has been configured for the current editor session, so
194+
there is no `shfmt`-specific configuration variable for this. If your editor is configured for
195+
two-space indents then that's what it will use. If you're using tabs for indentation then `shfmt`
196+
will use that.
197+
188198
## Logging
189199

190200
The minimum logging level for the server can be adjusted using the `BASH_IDE_LOG_LEVEL` environment variable

0 commit comments

Comments
 (0)