This commit is contained in:
2025-11-07 01:26:43 +08:00
parent e1b3fe7244
commit c23a1ba64a
4 changed files with 69 additions and 48 deletions
+10
View File
@@ -70,7 +70,17 @@
(use-package! nix-mode
:mode "\\.nix\\'"
:hook (nix-mode . lsp-deferred)
:config
;; Configure nil LSP server
(after! lsp-mode
(add-to-list 'lsp-language-id-configuration '(nix-mode . "nix"))
(lsp-register-client
(make-lsp-client :new-connection (lsp-stdio-connection "nil")
:major-modes '(nix-mode)
:server-id 'nil-ls
:priority 0)))
;; Function to check if we're in a nixpkgs repository
(defun in-nixpkgs-repo-p ()
(when-let ((root (or (locate-dominating-file default-directory ".git")