Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add nixd support #4125

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions clients/lsp-nix.el
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,27 @@
:synchronize-sections '("nil")
:server-id 'nix-nil))

(defgroup lsp-nix-nixd nil
"LSP support for Nix, using nil."
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably you meant nixd here ?

:group 'lsp-mode
:link '(url-link "https://github.com/nix-community/nixd"))

(defcustom lsp-nix-nixd-server-path "nixd"
"Executable path for the server."
:group 'lsp-nix-nixd
:type 'string
:package-version '(lsp-mode . "8.0.1"))

(lsp-register-client
(make-lsp-client :new-connection (lsp-stdio-connection (lambda () lsp-nix-nixd-server-path))
:major-modes '(nix-mode)
:initialized-fn (lambda (workspace)
(with-lsp-workspace workspace
(lsp--set-configuration
(lsp-configuration-section "nixd"))))
:synchronize-sections '("nixd")
:server-id 'nix-nixd))

(lsp-consistency-check lsp-nix)

(provide 'lsp-nix)
Expand Down
Loading