Skip to content

Commit

Permalink
fix: nixd option groups and documentation page (#4594)
Browse files Browse the repository at this point in the history
* Nix autocompletion options

* Support for formatting with nixd

* Revert nixd lsp name

* Fix nixd option groups

* Fixed documentation pages for nixd and rnix

* fix: use backticks for nixd documentation examples
  • Loading branch information
breitnw authored Oct 25, 2024
1 parent 1c407ec commit 49da7d1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
14 changes: 7 additions & 7 deletions clients/lsp-nix.el
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
(lsp-defcustom lsp-nix-nixd-formatting-command nil
"External formatter command with arguments.
Example: [ \"nixpkgs-fmt\" ]"
Example: `[\"nixpkgs-fmt\"]`"
:type 'lsp-string-vector
:group 'lsp-nix-nixd
:lsp-path "nixd.formatting.command"
Expand All @@ -70,30 +70,30 @@
Resource Usage: Entries are lazily evaluated, entire nixpkgs takes 200~300MB
for just \"names\". Package documentation, versions, are evaluated by-need.
Example: \"import <nixpkgs> { }\""
Example: `\"import <nixpkgs> { }\"`"
:type 'string
:group 'lsp-nix-nixd
:lsp-path "nixd.nixpkgs.expr"
:package-version '(lsp-mode . "9.0.1"))

(lsp-defcustom lsp-nix-nixd-nixos-options-expr nil
"Option set for NixOS option completion. If this is omitted, the default
search path (<nixpkgs>) will be used.
search path (`<nixpkgs>`) will be used.
Example:
\"(builtins.getFlake \"/home/lyc/flakes\").nixosConfigurations.adrastea.options\""
`\"(builtins.getFlake \"/home/lyc/flakes\").nixosConfigurations.adrastea.options\"`"
:type 'string
:group 'lsp-nix-nil
:group 'lsp-nix-nixd
:lsp-path "nixd.options.nixos.expr"
:package-version '(lsp-mode . "9.0.1"))

(lsp-defcustom lsp-nix-nixd-home-manager-options-expr nil
"Option set for home-manager option completion.
Example:
\"(builtins.getFlake \"/home/lyc/flakes\").nixosConfigurations.adrastea.options\""
`\"(builtins.getFlake \"/home/lyc/flakes\").nixosConfigurations.adrastea.options\"`"
:type 'string
:group 'lsp-nix-nil
:group 'lsp-nix-nixd
:lsp-path "nixd.options.home-manager.expr"
:package-version '(lsp-mode . "9.0.1"))

Expand Down
4 changes: 2 additions & 2 deletions docs/lsp-clients.json
Original file line number Diff line number Diff line change
Expand Up @@ -710,15 +710,15 @@
"debugger": "Not available"
},
{
"name": "nix",
"name": "nix-nixd",
"full-name": "Nix (nixd language server)",
"server-name": "nixd",
"server-url": "https://github.com/nix-community/nixd",
"installation": "nix profile install github:nixos/nixpkgs#nixd",
"debugger": "Not available"
},
{
"name": "nix",
"name": "nix-rnix",
"full-name": "Nix (rnix language server)",
"server-name": "rnix-lsp",
"server-url": "https://github.com/nix-community/rnix-lsp",
Expand Down

0 comments on commit 49da7d1

Please sign in to comment.