Have ideas to improve npm?Join in the discussion! »

    vls
    TypeScript icon, indicating that this package has built-in type declarations

    0.7.2 • Public • Published

    Vue Language Server

    VLS (Vue Language Server) is a language server implementation compatible with Language Server Protocol.

    Vetur is the VS Code client consuming vls.

    It's possible for other LSP compatible editors to build language server clients that consume vls.

    Usage

    There are two ways to integrate vls into editors:

    1. As a global executable.

    Example Client: https://github.com/autozimu/LanguageClient-neovim

    First, install VLS globally.

    npm install vls -g
    # or yarn global add vls

    This will provide you the global vls command.

    Then, configure LanguageClient to use vls. In this example, we write below configuration into init.vim.

    let g:LanguageClient_serverCommands = {
        \ 'vue': ['vls']
        \ }
    1. As a plugin dependency.

    Example: https://github.com/HerringtonDarkholme/atom-vue

    First, install vls as a local dependency.

    npm install vls --save
    # or yarn add vls

    Then, require the vls, this would typically look like:

    class VueLanguageClient extends AutoLanguageClient {
      startServerProcess () {
        return cp.spawn('node', [require.resolve('vls/dist/htmlServerMain')])
      }
    }
    1. As extension of coc.nvim

    Install coc.nvim in your vim/neovim.

    Then, run vim command

    :CocInstall coc-vetur
    

    Keywords

    none

    Install

    npm i vls

    DownloadsWeekly Downloads

    3,212

    Version

    0.7.2

    License

    MIT

    Unpacked Size

    14.3 MB

    Total Files

    36

    Last publish

    Collaborators

    • avatar
    • avatar