Skip to content

Commit b0dd1e3

Browse files
committed
Update README to reference shfmt
1 parent 6eb243e commit b0dd1e3

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

README.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Bash Language Server
22

3-
Bash language server that brings an IDE-like experience for bash scripts to most editors. This is based on the [Tree Sitter parser][tree-sitter-bash] and supports [explainshell][explainshell] and [shellcheck][shellcheck].
3+
Bash language server that brings an IDE-like experience for bash scripts to most editors. This is based on the [Tree Sitter parser][tree-sitter-bash] and supports [explainshell][explainshell], [shellcheck][shellcheck] and [shfmt][shfmt].
44

55
Documentation around configuration variables can be found in the [config.ts](https://github.com/bash-lsp/bash-language-server/blob/main/server/src/config.ts) file.
66

@@ -15,6 +15,7 @@ Documentation around configuration variables can be found in the [config.ts](htt
1515
- Documentation for symbols on hover
1616
- Workspace symbols
1717
- Rename symbol
18+
- Format document
1819

1920
To be implemented:
2021

@@ -24,7 +25,11 @@ To be implemented:
2425

2526
### Dependencies
2627

27-
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 or 500ms).
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).
29+
30+
If you want your shell scripts to be formatted consistently, you can install [shfmt][shfmt]. If
31+
`shfmt` is installed then your documents will be formatted whenever you take the 'format document'
32+
action. In most editors this can be configured to happen automatically when files are saved.
2833

2934
### Bash language server
3035

@@ -197,6 +202,7 @@ Please see [docs/development-guide][dev-guide] for more information.
197202
[sublime-text-lsp]: https://packagecontrol.io/packages/LSP-bash
198203
[explainshell]: https://explainshell.com/
199204
[shellcheck]: https://www.shellcheck.net/
205+
[shfmt]: https://github.com/mvdan/sh#shfmt
200206
[languageclient-neovim]: https://github.com/autozimu/LanguageClient-neovim
201207
[nvim-lspconfig]: https://github.com/neovim/nvim-lspconfig
202208
[vim-lsp]: https://github.com/prabirshrestha/vim-lsp

0 commit comments

Comments
 (0)