npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

vim-language-server

v2.3.1

Published

vim language server

Downloads

6,133

Readme

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:

:CocInstall coc-vimlsp

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

:InstallLspServer vim

Config

for document highlight

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

lsp client config example with coc.nvim

  • Using node ipc
"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" ],
  }
}
  • Using stdio
"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:

  • 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