GitHub - iamcco/vim-language-server: VImScript language server, LSP for vim script

VimScript Language Server

CI Npm Type download

language server for VimScript

Features:

  • auto completion
  • function signature help
  • hover document
  • go to definition
  • go to references
  • document symbols
  • document highlight
  • folding range
  • select range
  • rename
  • snippets
  • diagnostic

autocomplete

Install

For yarn

yarn global add vim-language-server

For npm

npm install -g vim-language-server

For coc.nvim user install coc extension:

For vim-easycomplete user install lsp server via :InstallLspServer vim and config nothing:

Config

for document highlight

let g:markdown_fenced_languages = [
      \ 'vim',
      \ 'help'
      \]

lsp client config example with coc.nvim

  • Using node ipc
  • Using stdio

Note:

  • if you set isNeovim: true, command like fixdel in vimrc which neovim does not support will report error.
  • if you want to speed up index, change gap to smaller and count to greater, this will cause high CPU usage for some time
  • if you don't want to index vim's runtimepath files, set runtimepath to false and you will not get any suggest from those files.

Usage

The screen record is using coc.nvim as LSP client.

Auto complete and function signature help:

autocomplete

Hover document:

hover

Go to definition and references:

goto

Document symbols:

symbols

Document highlight:

highlight

Folding range and selection range:

fold

Rename:

rename

Snippets and diagnostic:

dia

References

Similar project

Buy Me A Coffee ☕️

btc

image