Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 2902afd

Browse files
committed
add configuration instructions for vim text editor
1 parent 8790f74 commit 2902afd

File tree

1 file changed

+25
-5
lines changed

1 file changed

+25
-5
lines changed

‎README.md

Lines changed: 25 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Bash Language Server
22

3-
Bash language server implementation based on [Tree Sitter][tree-sitter] and its
4-
[grammar for Bash][tree-sitter-bash]with [explainshell][explainshell] integration.
3+
Bash language server implementation based on [Tree Sitter][tree-sitter] and its[grammar for Bash][tree-sitter-bash]
4+
with [explainshell][explainshell] integration.
55

66
## Features
77

@@ -22,13 +22,31 @@ npm i -g bash-language-server
2222

2323
### Clients
2424

25-
Clients have been implemented for:
25+
The following editors and IDEs have available clients:
2626

2727
- Visual Studio Code ([Bash IDE][vscode-marketplace])
28-
- Atom ([ide-bash][ide-bash]).
28+
- Atom ([ide-bash][ide-bash])
29+
- Vim (see below)
30+
- Neovim (see below)
31+
32+
#### Vim
33+
34+
For Vim 8 or later install the plugin [prabirshrestha/vim-lsp][vim-lsp] and add the following configuration to `.vimrc`:
35+
36+
```vim
37+
if executable('bash-language-server')
38+
au User lsp_setup call lsp#register_server({
39+
\ 'name': 'bash-language-server',
40+
\ 'cmd': {server_info->[&shell, &shellcmdflag, 'bash-language-server start']},
41+
\ 'whitelist': ['sh'],
42+
\ })
43+
endif
44+
```
2945

3046
#### Neovim
31-
Install the plugin [autozimu/LanguageClient-neovim](https://github.com/autozimu/LanguageClient-neovim) and add the following configuration to ``init.vim``:
47+
48+
Install the plugin [autozimu/LanguageClient-neovim][languageclient-neovim] and add the following configuration to
49+
`init.vim`:
3250

3351
```vim
3452
let g:LanguageClient_serverCommands = {
@@ -46,3 +64,5 @@ Please see [docs/development-guide][dev-guide] for more information.
4664
[dev-guide]: https://github.com/mads-hartmann/bash-language-server/blob/master/docs/development-guide.md
4765
[ide-bash]: https://atom.io/packages/ide-bash
4866
[explainshell]: https://explainshell.com/
67+
[languageclient-neovim]: https://github.com/autozimu/LanguageClient-neovim
68+
[vim-lsp]: https://github.com/prabirshrestha/vim-lsp

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /