VImScript language server, LSP for vim script
JavaScript
546
129 commits
updated Jun 26, 2023
language server for VimScript
Features:

For yarn
yarn global add vim-language-server
For npm
npm install -g vim-language-server
For coc.nvim user install coc extension:
:CocInstall coc-vimlsp
For vim-easycomplete user install lsp server via :InstallLspServer vim and config nothing:
:InstallLspServer vim
for document highlight
let g:markdown_fenced_languages = [
\ 'vim',
\ 'help'
\]
lsp client config example with coc.nvim
"languageserver": {
"vimls": {
"module": "/path/to/vim-language-server/bin/index.js",
"args": ["--node-ipc"],
"initializationOptions": {
"isNeovim": true, // is neovim, default false
"iskeyword": "@,48-57,_,192-255,-#", // vim iskeyword option
"vimruntime": "", // $VIMRUNTIME option
"runtimepath": "", // vim runtime path separate by `,`
"diagnostic": {
"enable": true
},
"indexes": {
"runtimepath": true, // if index runtimepath's vim files this will effect the suggest
"gap": 100, // index time gap between next file
"count": 3, // count of files index at the same time
"projectRootPatterns" : ["strange-root-pattern", ".git", "autoload", "plugin"] // Names of files used as the mark of project root. If empty, the default value [".git", "autoload", "plugin"] will be used
},
"suggest": {
"fromVimruntime": true, // completionItems from vimruntime's vim files
"fromRuntimepath": false // completionItems from runtimepath's vim files, if this is true that fromVimruntime is true
}
},
"filetypes": [ "vim" ],
}
}
"languageserver": {
"vimls": {
"command": "vim-language-server",
"args": ["--stdio"],
"initializationOptions": {
"isNeovim": true, // is neovim, default false
"iskeyword": "@,48-57,_,192-255,-#", // vim iskeyword option
"vimruntime": "", // $VIMRUNTIME option
"runtimepath": "", // vim runtime path separate by `,`
"diagnostic": {
"enable": true
},
"indexes": {
"runtimepath": true, // if index runtimepath's vim files this will effect the suggest
"gap": 100, // index time gap between next file
"count": 3, // count of files index at the same time
"projectRootPatterns" : ["strange-root-pattern", ".git", "autoload", "plugin"] // Names of files used as the mark of project root. If empty, the default value [".git", "autoload", "plugin"] will be used
},
"suggest": {
"fromVimruntime": true, // completionItems from vimruntime's vim files
"fromRuntimepath": false // completionItems from runtimepath's vim files, if this is true that fromVimruntime is true
}
},
"filetypes": [ "vim" ]
}
}
Note:
isNeovim: true, command like fixdel in vimrc which neovim does not support will report error.gap to smaller and count to greater, this will cause high CPU usage for some timeruntimepath to false and you will not get any suggest from those files.The screen record is using coc.nvim as LSP client.
Auto complete and function signature help:

Hover document:

Go to definition and references:

Document symbols:

Document highlight:

Folding range and selection range:

Rename:

Snippets and diagnostic:


Overall
Maintained
Code review
Latest release
Releases this year
1,261 followers · starred Dec 2020
1,700 followers · starred May 2020
788 followers · starred Feb 2026
1,132 followers · starred May 2019
VImScript language server, LSP for vim script
JavaScript
546
129 commits
updated Jun 26, 2023
language server for VimScript
Features:

For yarn
yarn global add vim-language-server
For npm
npm install -g vim-language-server
For coc.nvim user install coc extension:
:CocInstall coc-vimlsp
For vim-easycomplete user install lsp server via :InstallLspServer vim and config nothing:
:InstallLspServer vim
for document highlight
let g:markdown_fenced_languages = [
\ 'vim',
\ 'help'
\]
lsp client config example with coc.nvim
"languageserver": {
"vimls": {
"module": "/path/to/vim-language-server/bin/index.js",
"args": ["--node-ipc"],
"initializationOptions": {
"isNeovim": true, // is neovim, default false
"iskeyword": "@,48-57,_,192-255,-#", // vim iskeyword option
"vimruntime": "", // $VIMRUNTIME option
"runtimepath": "", // vim runtime path separate by `,`
"diagnostic": {
"enable": true
},
"indexes": {
"runtimepath": true, // if index runtimepath's vim files this will effect the suggest
"gap": 100, // index time gap between next file
"count": 3, // count of files index at the same time
"projectRootPatterns" : ["strange-root-pattern", ".git", "autoload", "plugin"] // Names of files used as the mark of project root. If empty, the default value [".git", "autoload", "plugin"] will be used
},
"suggest": {
"fromVimruntime": true, // completionItems from vimruntime's vim files
"fromRuntimepath": false // completionItems from runtimepath's vim files, if this is true that fromVimruntime is true
}
},
"filetypes": [ "vim" ],
}
}
"languageserver": {
"vimls": {
"command": "vim-language-server",
"args": ["--stdio"],
"initializationOptions": {
"isNeovim": true, // is neovim, default false
"iskeyword": "@,48-57,_,192-255,-#", // vim iskeyword option
"vimruntime": "", // $VIMRUNTIME option
"runtimepath": "", // vim runtime path separate by `,`
"diagnostic": {
"enable": true
},
"indexes": {
"runtimepath": true, // if index runtimepath's vim files this will effect the suggest
"gap": 100, // index time gap between next file
"count": 3, // count of files index at the same time
"projectRootPatterns" : ["strange-root-pattern", ".git", "autoload", "plugin"] // Names of files used as the mark of project root. If empty, the default value [".git", "autoload", "plugin"] will be used
},
"suggest": {
"fromVimruntime": true, // completionItems from vimruntime's vim files
"fromRuntimepath": false // completionItems from runtimepath's vim files, if this is true that fromVimruntime is true
}
},
"filetypes": [ "vim" ]
}
}
Note:
isNeovim: true, command like fixdel in vimrc which neovim does not support will report error.gap to smaller and count to greater, this will cause high CPU usage for some timeruntimepath to false and you will not get any suggest from those files.The screen record is using coc.nvim as LSP client.
Auto complete and function signature help:

Hover document:

Go to definition and references:

Document symbols:

Document highlight:

Folding range and selection range:

Rename:

Snippets and diagnostic:


Overall
Maintained
Code review
Latest release
Releases this year
1,261 followers · starred Dec 2020
1,700 followers · starred May 2020
788 followers · starred Feb 2026
1,132 followers · starred May 2019