Skip to content

Installation

Turiiya edited this page Apr 7, 2024 · 1 revision

To install v-analyzer's latest release and development versions directly from its source, install.vsh can be run as a webscript.

Linux and macOS

v -e "$(curl -fsSL https://raw.githubusercontent.com/vlang/v-analyzer/main/install.vsh)"

Windows

Note

The install.vsh file is downloaded to the current directory and stored there temporarily. If there is another file with this name, make sure it is safe when it is overwritten/deleted.

Powershell

curl -o install.vsh https://raw.githubusercontent.com/vlang/v-analyzer/main/install.vsh; v run install.vsh; del install.vsh

Command Shell

curl -o install.vsh https://raw.githubusercontent.com/vlang/v-analyzer/main/install.vsh && v run install.vsh && del install.vsh

Pre-built Binaries

Pre-built binaries are available on the releases page. Currently, we provide binaries for Linux (x64), macOS (x64 and ARM), and Windows (x64).

Post-Installation

It's recommended to add v-analyzer's bin/ folder to your $PATH environment variable to easily use the v-analyzer command. For editor specific setup instructions refer to the section below.

Updating

Update v-analyzer to the latest release version by running:

v-analyzer up

To get the latest development version, run:

v-analyzer up --nightly

Note

Using the nightly version can include changes that may need to be stabilized until the next release.

Editor Setup

Regardless of the editor used, under the hood, the language server client will use a v-analyzer binary. Installing v-analyzer as an extension directly in your editor might use a download reference that has not yet been set to the latest version. In case you don't want to wait for an update, it is always possible to use or to specify the path to an installation which was made directly from this repository or to a self-compiled binary.

VS Code

The VS Code extension is available via the VS Code Marketplace. The source code for extension is contained in the editors/code folder of this repository.

Specify the path to the binary In your VS Code settings:

// ../User/settings.json
{
	"v-analyzer.serverPath": "/path/to/v-analyzer/bin/v-analyzer"
}

Note

Reload VS Code after changing the settings or PATH.

Neovim

For nvim users, v-analyzer is available via nvim-lspconfig. When using the mason lsp plugins, it can be installed with :LspInstall v_analyzer.

Helix

  • To-do
Clone this wiki locally