Skip to content

Commit 5e540ac

Browse files
authored
Merge branch 'main' into clear-diagnostics-on-close
2 parents 8d3538b + 1c2a204 commit 5e540ac

30 files changed

+855
-122
lines changed

.github/workflows/upgrade-tree-sitter.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
3737
- name: Create pull request
3838
if: steps.verify-changed-files.outputs.files_changed == 'true'
39-
uses: peter-evans/create-pull-request@v5
39+
uses: peter-evans/create-pull-request@v6
4040
with:
4141
add-paths: server
4242
title: Auto upgrade tree-sitter-bash parser

.github/workflows/verify.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ jobs:
1414
steps:
1515
- uses: actions/checkout@v4
1616

17-
- name: Install shellcheck (used for testing)
18-
run: sudo apt-get install -y shellcheck
17+
- name: Install shellcheck and shfmt (used for testing)
18+
run: sudo apt-get install -y shellcheck shfmt
1919

2020
- uses: pnpm/action-setup@v2
2121
with:
@@ -34,7 +34,7 @@ jobs:
3434
run: pnpm verify:bail
3535

3636
- name: Publish coverage to codecov.io
37-
uses: codecov/codecov-action@v3
37+
uses: codecov/codecov-action@v4
3838
if: success() && matrix.node-version == '20.x'
3939
with:
4040
token: ${{ secrets.CODECOV_TOKEN }}

.vscode/settings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@
88
"typescript.tsdk": "./node_modules/typescript/lib",
99
"typescript.tsc.autoDetect": "off",
1010
"editor.codeActionsOnSave": {
11-
"source.fixAll.eslint": true
11+
"source.fixAll.eslint": "explicit"
1212
}
1313
}

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

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
},
1919
"devDependencies": {
2020
"@types/jest": "29.5.12",
21-
"@types/node": "18.19.29",
21+
"@types/node": "18.19.30",
2222
"@typescript-eslint/eslint-plugin": "7.5.0",
2323
"@typescript-eslint/parser": "7.5.0",
2424
"eslint": "8.57.0",
@@ -30,16 +30,16 @@
3030
"jest": "29.7.0",
3131
"prettier": "2.8.8",
3232
"ts-jest": "29.1.2",
33-
"typescript": "5.4.3",
33+
"typescript": "5.4.4",
3434
"vscode-languageserver": "8.0.2",
3535
"vscode-languageserver-textdocument": "1.0.11"
3636
},
3737
"resolutions": {
38-
"@types/vscode": "1.87.0"
38+
"@types/vscode": "1.88.0"
3939
},
4040
"engines": {
4141
"node": ">=16",
42-
"pnpm": "8.x"
42+
"pnpm": ">=8.x"
4343
},
4444
"jest": {
4545
"preset": "ts-jest",

0 commit comments

Comments
 (0)