https://github.com/bash-lsp/bash-language-server Skip to content Sign up Sign up * Why GitHub? Features - + Mobile - + Actions - + Codespaces - + Packages - + Security - + Code review - + Project management - + Integrations - + GitHub Sponsors - + Customer stories- * Team * Enterprise * Explore + Explore GitHub - Learn and contribute + Topics - + Collections - + Trending - + Learning Lab - + Open source guides - Connect with others + The ReadME Project - + Events - + Community forum - + GitHub Education - + GitHub Stars program - * Marketplace * Pricing Plans - + Compare plans - + Contact Sales - + Education - [ ] [search-key] * # In this repository All GitHub | Jump to | * No suggested jump to results * # In this repository All GitHub | Jump to | * # In this organization All GitHub | Jump to | * # In this repository All GitHub | Jump to | Sign in Sign up Sign up {{ message }} bash-lsp / bash-language-server * Notifications * Star 802 * Fork 61 A language server for Bash MIT License 802 stars 61 forks Star Notifications * Code * Issues 61 * Pull requests 6 * Actions * Projects 0 * Security * Insights More * Code * Issues * Pull requests * Actions * Projects * Security * Insights master Switch branches/tags [ ] Branches Tags Nothing to show {{ refName }} default View all branches Nothing to show {{ refName }} default View all tags 10 branches 34 tags Go to file Code Clone HTTPS GitHub CLI [https://github.com/b] Use Git or checkout with SVN using the web URL. [gh repo clone bash-l] Work fast with our official CLI. Learn more. * Open with GitHub Desktop * Download ZIP Launching GitHub Desktop If nothing happens, download GitHub Desktop and try again. Go back Launching GitHub Desktop If nothing happens, download GitHub Desktop and try again. Go back Launching Xcode If nothing happens, download Xcode and try again. Go back Launching Visual Studio If nothing happens, download the GitHub extension for Visual Studio and try again. Go back Latest commit @skovhus skovhus Merge pull request #283 from bash-lsp/dependabot/npm_and_yarn /server/... ... fa5a65e Mar 2, 2021 Merge pull request #283 from bash-lsp/dependabot/npm_and_yarn/server/ ... ...urijs-1.19.6 fa5a65e Git stats * 474 commits Files Permalink Failed to load latest commit information. Type Name Latest commit message Commit time .github/workflows Only trigger verify CI step on PRs May 6, 2020 .vscode Update tsconfig and vscode tasks setup Apr 17, 2020 docs Update tsconfig and vscode tasks setup Apr 17, 2020 scripts Use git tags for client Mar 5, 2020 server Bump urijs from 1.19.4 to 1.19.6 in /server Mar 1, 2021 testing Document variable expansion support May 19, 2020 vscode-client Bump urijs from 1.19.1 to 1.19.5 in /vscode-client Dec 31, 2020 .eslintignore Do no lint coverage folder Mar 4, 2020 .eslintrc.js Relax TypeScript, eslint will take care of this Mar 3, 2020 .gitignore Switch from tslint to eslint Sep 25, 2019 .prettierrc Add prettierrc file so vscode will respect it Aug 2, 2018 LICENSE Initial commit Feb 24, 2018 Makefile Switch to yarn instead of npm Apr 7, 2018 README.md Add instruction for neovim built-in lsp Jan 12, 2021 TODO.md Provide completions based on the executables on your PATH Apr 7, 2018 codecov.yml Setup codecov Mar 5, 2020 package.json Update tsconfig and vscode tasks setup Apr 17, 2020 setupJest.ts Upgrade TypeScript and Jest Sep 25, 2019 tsconfig.eslint.json Update tsconfig and vscode tasks setup Apr 17, 2020 tsconfig.json Update tsconfig and vscode tasks setup Apr 17, 2020 yarn.lock Bump lodash from 4.17.15 to 4.17.20 Aug 20, 2020 View code Bash Language Server Features Installation Clients Vim Neovim Oni Emacs Development Guide README.md Bash Language Server Bash language server implementation based on Tree Sitter and its grammar for Bash with explainshell integration. Features * [*] Jump to declaration * [*] Find references * [*] Code Outline & Show Symbols * [*] Highlight occurrences * [*] Code completion * [*] Simple diagnostics reporting * [*] Documentation for flags on hover * [*] Workspace symbols * [ ] Rename symbol Installation npm i -g bash-language-server If you encounter installation errors, ensure you have node version 8 or newer (node --version). Clients The following editors and IDEs have available clients: * Visual Studio Code (Bash IDE) * Atom (ide-bash) * Sublime Text (LSP-bash) * Vim (see below) * Neovim (see below) * Oni (see below) * Eclipse (ShellWax) * Emacs (see below) * JupyterLab (jupyterlab-lsp) Vim For Vim 8 or later install the plugin prabirshrestha/vim-lsp and add the following configuration to .vimrc: if executable('bash-language-server') au User lsp_setup call lsp#register_server({ \ 'name': 'bash-language-server', \ 'cmd': {server_info->[&shell, &shellcmdflag, 'bash-language-server start']}, \ 'allowlist': ['sh'], \ }) endif For Vim 8 or Neovim using neoclide/coc.nvim, according to it's Wiki article, add the following to your coc-settings.json: "languageserver": { "bash": { "command": "bash-language-server", "args": ["start"], "filetypes": ["sh"], "ignoredRootPaths": ["~"] } } For Vim 8 or NeoVim using dense-analysis/ale add the following configuration to your .vimrc: let g:ale_linters = { \ 'sh': ['language_server'], \ } Neovim For NeoVim using autozimu/LanguageClient-neovim, add the following configuration to init.vim: let g:LanguageClient_serverCommands = { \ 'sh': ['bash-language-server', 'start'] \ } For NeoVim v0.5(nightly) using its built-in lsp, install neovim/ nvim-lspconfig and add the following configuration to either your init.vim or init.lua init.vim: lua require'lspconfig'.bashls.setup{} or init.lua: require'lspconfig'.bashls.setup{} Oni On the config file (File -> Preferences -> Edit Oni config) add the following configuration: "language.bash.languageServer.command": "bash-language-server", "language.bash.languageServer.arguments": ["start"], Emacs Lsp-mode has a built-in client, can be installed by use-package. Add the configuration to your .emacs.d/init.el (use-package lsp-mode :commands lsp :hook (sh-mode . lsp)) Development Guide Please see docs/development-guide for more information. About A language server for Bash Topics bash language-server Resources Readme License MIT License Releases 34 tags Packages 0 No packages published Used by 80 * @jamestthompson3 * @4the1appdevs * @david-kariuki * @popper2710 * @klooj * @NateEag * @zdrazil + 72 Contributors 28 * @skovhus * @mads-hartmann * @nikita-skobov * @dependabot * @chrismwendt * @rcjsuen * @ckjoris * @otreblan * @akurtakov * @maximbaz * @SKalt + 17 contributors Languages * TypeScript 88.2% * Shell 9.2% * JavaScript 2.3% * Other 0.3% * (c) 2021 GitHub, Inc. * Terms * Privacy * Security * Status * Docs * Contact GitHub * Pricing * API * Training * Blog * About You can't perform that action at this time. You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.