## Install for Vim with npm

Supported operating systems:

GNU/Linux and macOS instructions

quick-lint-js has an npm package, making it easy to install the LSP server for use by the Vim plugin.

### Install prerequisites

In order to install quick-lint-js' npm package, you must first install the npm client.

Install and configure one of the following Vim plugins:

- ALE - Asynchronous Lint Engine v2.1.1 or newer, or version v3.0.0 or newer
- coc.nvim - Conquer of Completion v0.0.80 or newer

### Install quick-lint-js

Install quick-lint-js globally (on your machine) for use anywhere, including the Vim plugin:

>     npm install --global quick-lint-js

Note: The Vim plugin does not use quick-lint-js if it is installed locally within your project. The Vim plugin only uses quick-lint-js if it is globally installed.

### Install Vim plugin

Install this plugin with your favorite Vim packaging system:

- Vim package (built into Vim 8.0 and newer)
- Pathogen
- Vim-Plug
- Vundle

#### Install as a Vim package

This option requires Vim 8.0 or newer.

1. Download the quick-lint-js Vim plugin.
2. Add `packloadall` to your `%USERPROFILE%\_vimrc` file (or `%USERPROFILE%\vimfiles\vimrc`) if not already present.
3. Create the directory `%USERPROFILE%\vimfiles\pack\external\start\`.
4. Copy the extracted `quick-lint-js.vim` directory into the `%USERPROFILE%\vimfiles\pack\external\start\` directory.
5. Restart Vim.

#### Install with Pathogen

This option requires Pathogen.

1. Download the quick-lint-js Vim plugin.
2. Copy the extracted `quick-lint-js.vim` directory into the `%USERPROFILE%\vimfiles\bundle\` directory.
3. Restart Vim.

#### Install with Vim-Plug

This option requires Vim-Plug.

1. Add the following line to your `vimrc` file between `call plug#begin(...)` and `call plug#end()`:

   >     Plug 'quick-lint/quick-lint-js', {'rtp': 'plugin/vim/quick-lint-js.vim', 'tag': '2.3.0'}

2. Restart Vim.
3. In Vim, run `:PlugInstall`.

#### Install with Vundle

This option requires Vundle.

Using Vundle is not recommended. Vundle doesn't support version pinning. We recommend using a different Vim plugin manager.

1. Add the following line to your `vimrc` file between `call vundle#begin(...)` and `call vundle#end()`:

   >     Plugin 'quick-lint/quick-lint-js', {'rtp': 'plugin/vim/quick-lint-js.vim'}

2. Restart Vim.
3. In Vim, run `:PluginInstall`.

### Configure

Configure the Vim plugin by opening Vim and running `:help quick-lint-js`, or read the Vim plugin docs online.