Follow the specific instructions below to integrate nimlangserver with your preferred editor. nimlangserver implements the Language Server Protocol (LSP) and is the default server mode.
### VSCode
Install the [vscode-nim](https://github.com/nim-lang/vscode-nim) extension. It bundles the LSP server and the MCP server.
### Sublime Text
Install [LSP-nimlangserver](https://packagecontrol.io/packages/LSP-nimlangserver) from Package Control.
### Zed Editor
Install the [Nim Extension](https://github.com/foxoman/zed-nim) from the Zed Editor extensions panel.
### Helix
Install `nimlangserver` with Nimble and ensure it is on your `PATH`. Verify with `hx --health nim`.
### Neovim (lspconfig)
Install `nvim-lspconfig` and add to your `init.vim`:
```lua
require'lspconfig'.nim_langserver.setup{
settings = {
nim = {
nimsuggestPath = "~/.nimble/bin/nimsuggest"
}
}
}
VIM / Neovim (coc.nvim)
Create a coc-settings.json alongside your init.vim:
{
"languageserver": {
"nim": {
"command": "nimlangserver",
"filetypes": ["nim"],
"trace.server": "verbose",
"settings": {
"nim": {
"nimsuggestPath": "~/.nimble/bin/nimsuggest"
}
}
}
}
}
Emacs
Install lsp-mode and nim-mode from MELPA, then add to your config:
(add-hook 'nim-mode-hook #'lsp)