Bash Language Server by Bitno
A lightweight, private and secure Bash language server for VS Code.
Early development: this extension is still being built. Expect missing features, rough edges and breaking changes between versions.
Lightweight, private and secure by design
Built by a developer, for developers.
- Lightweight: it starts only when you open a shell script. ShellCheck and shfmt come built in as WebAssembly, so there's nothing to install, and each loads the first time it's needed.
- Private: no telemetry, no account, no cloud. The extension downloads and contacts nothing over the network; ShellCheck and shfmt ship with it. It reads only your open scripts, their
.editorconfig, the commands on your PATH, and the help text and man pages you hover over. A ShellCheck finding links to its wiki page, which opens only when you click it.
- Secure: your scripts are checked and formatted, never run. Hover runs only
help and man, with the command's name as an argument and never through a shell, so nothing in a script can inject a command.
Features
- Syntax errors as you type: unbalanced quotes and parentheses, and missing
fi, done or esac, are underlined in shell scripts.
- ShellCheck, built in: ShellCheck's warnings and suggestions as you type, each linked to its wiki page; nothing to install.
- Quick fixes: apply ShellCheck's own fix, or disable a check for one command with a
# shellcheck disable= directive.
- Formatting with shfmt, built in: Format Document prints scripts as
shfmt does, with the options in your .editorconfig or the editor's indentation; nothing to install.
- Outline and navigation: the script's functions and variables in the outline, go to definition, find references, and highlighting of every use of the name under the cursor.
- Completion: variables after
$, and keywords, builtins, the script's functions and the commands on your PATH where a command starts.
- Hover: a builtin's
help text or a command's man page, from your machine.
- Folding and expand selection: fold functions, loops,
if branches, here-documents and comment blocks; grow the selection along the script's structure.
- Server status in the status bar: the Bash icon with a short status ("Bash: Starting", "Bash: Ready", or the server's current work), red when it failed to start; hover it for the version, the server's work and state, and the Node it runs on.
| |