A language server for bash
- Find references
- Go to definition
- Completion
- Hover
Download latest release
Extract help messages (optional)
# download the script
curl -O https://raw.githubusercontent.com/syeero7/bash_ls/main/extract_help.bash
# edit the script (add/remove commands)
# default script include bash builtins and other common commands
# make it executable
chmod +x ./extract_help.bash
# run the script
./extract_help.bash <output_path>
# default output path is ./command_help.jsonl vim.lsp.config("bash_ls", {
cmd = {
"/path/to/bash_ls",
"--log-file","/path/to/log_file", -- optional
"--command-help", "/path/to/command_help.jsonl" -- optional
},
filetypes = {
"bash",
"sh"
},
})
vim.lsp.enable("bash_ls")Install Zig v0.16
# clone the repository
git clone https://github.com/syeero7/bash_ls
cd bash_ls
# native build
zig build -Doptimize=ReleaseFast
# build for multiple targets. check build.zig
zig build -Doptimize=ReleaseFast -Dmulti-targetszig build test --summary all