Skip to content

Commit

Permalink
docs: split editors.md from docs/editor-setup
Browse files Browse the repository at this point in the history
  • Loading branch information
inclyc committed Sep 10, 2023
1 parent f88accc commit 458c466
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 20 deletions.
20 changes: 0 additions & 20 deletions docs/editor-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
```
33 changes: 33 additions & 0 deletions editors/editors.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
## 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
```

0 comments on commit 458c466

Please sign in to comment.