diff --git a/docs/editor-setup.md b/docs/editor-setup.md index f715b22fc..5cb7dfedd 100644 --- a/docs/editor-setup.md +++ b/docs/editor-setup.md @@ -15,13 +15,6 @@ Refer to https://github.com/nix-community/nixd/blob/main/docs/user-guide.md#inst https://github.com/nix-community/vscode-nix-ide extension provide a general interface for nixd, and it should work out of box. Please file a bug if you encountered some trouble using the extension. -We provide a test environment with the *vscode-nix-ide* plugin, and the repository has some [configuration examples](/docs/examples) that you can try. - -Start up the test environment: -```console -$ nix develop github:nix-community/nixd#vscodium - -$ codium-test ``` ### (Neo)vim @@ -46,16 +39,3 @@ According to `:help coc-config.txt`, `coc-settings.json`: Neovim native LSP and [nvim-lspconfig](https://github.com/neovim/nvim-lspconfig). We are officially supported by nvim-lspconfig, see [upstream docs](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.txt#nixd) -Also, we provide an [example config](/editors/nvim-lsp.nix) for testing, You can run the following command to edit a *.nix file -```console -$ nix develop github:nix-community/nixd#nvim - -$ nvim-lsp /tmp/test/default.nix -``` -tip: If you want to configure lsp itself, see [configuration](/docs/user-guide.md#configuration), and the following tree-like directory -```console -# tree -a /tmp/test -/tmp/test/ -├── default.nix -└── .nixd.json -``` diff --git a/editors/editors.md b/editors/editors.md new file mode 100644 index 000000000..a3e089526 --- /dev/null +++ b/editors/editors.md @@ -0,0 +1,38 @@ +## Reproducible Testing Editors Environment + +### VSCodium + +We provide a test environment with the *vscode-nix-ide* plugin, and the repository has some [configuration examples](/docs/examples) that you can try. + +Start up the test environment: + +```console +$ nix develop github:nix-community/nixd#vscodium + +$ codium-test +``` + +### Neovim + +You can run the following command to edit a *.nix file + +```console +$ nix develop github:nix-community/nixd#nvim + +$ nvim-lsp /tmp/test/default.nix + +``` + +tip: If you want to configure lsp itself, see [configuration](/docs/user-guide.md#configuration), and the following tree-like directory + +```console +# tree -a /tmp/test +/tmp/test/ +├── default.nix +└── .nixd.json +``` + + +## Tips + +If you have no files/flakes to explore the LSP, we have some tested examples [here](docs/examples).