diff --git a/.gitignore b/.gitignore index ebef45a..10e8057 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,4 @@ tests/all nimble.develop nimble.paths nimbledeps +dprint.json diff --git a/README.md b/README.md index f68cbd5..0a21bac 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,7 @@ Nim Language Server, or `nimlangserver`, is a language server for Nim. ### Installing binaries _NB:_ `nimlangserver` requires `nimsuggest` version that supports `--v3`: + - `devel` containing [19826](https://github.com/nim-lang/Nim/pull/19826) - 1.6+ containing [19892](https://github.com/nim-lang/Nim/pull/19892) @@ -27,19 +28,24 @@ nimble build ``` ### VSCode + - [vscode-nim](https://github.com/nim-lang/vscode-nim) has support for `nimlangserver`. Follow the instructions at: -https://github.com/nim-lang/vscode-nim#using + https://github.com/nim-lang/vscode-nim#using ### Sublime Text + Install [LSP-nimlangserver](https://packagecontrol.io/packages/LSP-nimlangserver) from Package Control. ### Zed Editor + Install [Nim Extenstion](https://github.com/foxoman/zed-nim) from the Zed Editor extensions. ### Helix + Just install the langserver with Nimble and make sure it's on your PATH. To verify that everything is set up, run: + ```shell $ hx --health nim Configured language servers: @@ -54,7 +60,9 @@ Configured language servers: ``` ### Neovim + - [lsp](https://neovim.io/doc/user/lsp.html) Neovim has built-in LSP support. Although, you might want to use something like [lsp-config](https://github.com/neovim/nvim-lspconfig) to take care of the boilerplate code for the most LSP configurations. Install `lsp-config` using your favourite plugin manager an place the following code into your `init.vim` config: + ```lua lua <= 0.2.4` must be use - [nimlsp](https://github.com/PMunch/nimlsp) - Both `nimlangserver` and `nimlsp` are based on `nimsuggest`, but the main - difference is that `nimlsp` has a single specific version of `nimsuggest` - embedded in the server executable, while `nimlangserver` launches `nimsuggest` - as an external process. This allows `nimlangserver` to handle any `nimsuggest` - crashes more gracefully. + Both `nimlangserver` and `nimlsp` are based on `nimsuggest`, but the main + difference is that `nimlsp` has a single specific version of `nimsuggest` + embedded in the server executable, while `nimlangserver` launches `nimsuggest` + as an external process. This allows `nimlangserver` to handle any `nimsuggest` + crashes more gracefully. ## License