Bash language server implementation based on Tree Sitter and its grammar for Bash with explainshell integration.
- Jump to declaration
- Find references
- Code Outline & Show Symbols
- Highlight occurrences
- Code completion
- Simple diagnostics reporting
- Documentation for flags on hover
- Rename symbol
npm i -g bash-language-server
The following editors and IDEs have available clients:
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']},
\ 'whitelist': ['sh'],
\ })
endif
Install the plugin autozimu/LanguageClient-neovim and add the following configuration to
init.vim
:
let g:LanguageClient_serverCommands = {
\ 'sh': ['bash-language-server', 'start']
\ }
Please see docs/development-guide for more information.