mirror of
https://github.com/oxalica/nil.git
synced 2024-11-23 03:57:06 +03:00
Update README
This commit is contained in:
parent
35d2bac1fb
commit
17fc5fdfec
28
README.md
28
README.md
@ -2,7 +2,7 @@ nil: Language server for Nix Expression Language
|
||||
|
||||
🚧 *This project is under development, but be happy to try it out!*
|
||||
|
||||
Super fast incremental analysis! Scans `all-packages.nix` in less then 0.1s and completes with no delay!
|
||||
Super fast incremental analysis! Scans `all-packages.nix` in less than 0.1s and completes with no delay!
|
||||
|
||||
## Features
|
||||
|
||||
@ -19,11 +19,14 @@ Super fast incremental analysis! Scans `all-packages.nix` in less then 0.1s and
|
||||
|
||||
## Installation
|
||||
|
||||
**TODO: Beginner friendly instructions.**
|
||||
|
||||
This repo is packaged via [Nix flakes][nix-flakes], the language server binary package is
|
||||
available through the default flake output `github:oxalica/nil#` with the path `bin/nil`.
|
||||
|
||||
You can [enable flakes support][nix-flakes-install] in your nix configuration, and then
|
||||
run `nix profile install github:oxalica/nil` to get `nil` installed.
|
||||
You can also use this repository as a flake input and add its output to your own flake-managed
|
||||
systemwide or home configuration.
|
||||
|
||||
Flake output structure:
|
||||
```
|
||||
├───devShells
|
||||
@ -36,6 +39,7 @@ Flake output structure:
|
||||
```
|
||||
|
||||
[nix-flakes]: https://nixos.wiki/wiki/Flakes
|
||||
[nix-flakes-install]: https://nixos.wiki/wiki/Flakes#Installing_flakes
|
||||
|
||||
### For neovim `nvim-lspconfig` user
|
||||
|
||||
@ -45,12 +49,26 @@ Add the following vimscript to your configuration.
|
||||
lua <<EOF
|
||||
require('lspconfig').rnix.setup {
|
||||
autostart = true,
|
||||
-- Change it to the path to the `nil` binary you installed.
|
||||
cmd = { "/run/current-system/sw/bin/nil" },
|
||||
-- Ensure `nil` is in your PATH.
|
||||
cmd = { "nil" },
|
||||
}
|
||||
EOF
|
||||
```
|
||||
|
||||
### For emacs `eglot` user
|
||||
|
||||
Add the following elisp code to your configuration. (using `use-package`)
|
||||
|
||||
```elisp
|
||||
(use-package nix-mode)
|
||||
(use-package eglot
|
||||
:config
|
||||
;; Ensure `nil` is in your PATH.
|
||||
(add-to-list 'eglot-server-programs '(nix-mode . ("nil")))
|
||||
:hook
|
||||
(nix-mode . eglot-ensure))
|
||||
```
|
||||
|
||||
## License
|
||||
|
||||
"nil" is primarily distributed under the terms of both the MIT
|
||||
|
Loading…
Reference in New Issue
Block a user