[NixOS] More nix language server support

This commit is contained in:
Ivan Malison 2023-08-05 17:49:31 -06:00
parent 264e596cea
commit 37b915a362
3 changed files with 27 additions and 18 deletions

View File

@ -2618,6 +2618,7 @@ eval-last-sexp.
*** nix *** nix
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(use-package nix-mode (use-package nix-mode
:hook (nix-mode . lsp-deferred)
:preface :preface
(progn (progn
(imalison:add-blacklist-to-major nix-mode) (imalison:add-blacklist-to-major nix-mode)
@ -2625,6 +2626,13 @@ eval-last-sexp.
:config :config
(progn (progn
(setq nix-indent-function 'nix-indent-line))) (setq nix-indent-function 'nix-indent-line)))
(use-package lsp-nix
:straight nil
:after (lsp-mode)
:config
(progn
(setq lsp-nix-nil-formatter ["nixpkgs-fmt"])))
#+END_SRC #+END_SRC
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(use-package nix-update (use-package nix-update

View File

@ -53,5 +53,6 @@
# nix # nix
nixd nixd
nil
]; ];
} }

View File

@ -1,18 +1,18 @@
{ {
inputs = { inputs = {
nixos-hardware = { url = github:NixOS/nixos-hardware; }; nixos-hardware = { url = "github:NixOS/nixos-hardware"; };
nixpkgs = { nixpkgs = {
url = github:NixOS/nixpkgs/nixos-unstable; url = "github:NixOS/nixpkgs/nixos-unstable";
}; };
home-manager = { home-manager = {
url = github:nix-community/home-manager; url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
xmonad-contrib = { xmonad-contrib = {
url = github:IvanMalison/xmonad-contrib/withMyChanges; url = "github:IvanMalison/xmonad-contrib/withMyChanges";
inputs = { inputs = {
nixpkgs.follows = "nixpkgs"; nixpkgs.follows = "nixpkgs";
flake-utils.follows = "flake-utils"; flake-utils.follows = "flake-utils";
@ -22,7 +22,7 @@
}; };
xmonad = { xmonad = {
url = path:../dotfiles/config/xmonad/xmonad; url = "path:../dotfiles/config/xmonad/xmonad";
inputs = { inputs = {
nixpkgs.follows = "nixpkgs"; nixpkgs.follows = "nixpkgs";
flake-utils.follows = "flake-utils"; flake-utils.follows = "flake-utils";
@ -31,7 +31,7 @@
}; };
taffybar = { taffybar = {
url = path:../dotfiles/config/taffybar/taffybar; url = "path:../dotfiles/config/taffybar/taffybar";
inputs = { inputs = {
nixpkgs.follows = "nixpkgs"; nixpkgs.follows = "nixpkgs";
flake-utils.follows = "flake-utils"; flake-utils.follows = "flake-utils";
@ -43,7 +43,7 @@
}; };
imalison-taffybar = { imalison-taffybar = {
url = path:../dotfiles/config/taffybar; url = "path:../dotfiles/config/taffybar";
inputs = { inputs = {
nixpkgs.follows = "nixpkgs"; nixpkgs.follows = "nixpkgs";
flake-utils.follows = "flake-utils"; flake-utils.follows = "flake-utils";
@ -53,30 +53,30 @@
}; };
notifications-tray-icon = { notifications-tray-icon = {
url = github:IvanMalison/notifications-tray-icon; url = "github:IvanMalison/notifications-tray-icon";
inputs.flake-utils.follows = "flake-utils"; inputs.flake-utils.follows = "flake-utils";
inputs.git-ignore-nix.follows = "git-ignore-nix"; inputs.git-ignore-nix.follows = "git-ignore-nix";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
nix = { nix = {
url = github:IvanMalison/nix/my2.15.1; url = "github:IvanMalison/nix/my2.15.1";
}; };
flake-utils = { flake-utils = {
url = github:numtide/flake-utils; url = "github:numtide/flake-utils";
inputs.systems.follows = "systems"; inputs.systems.follows = "systems";
}; };
systems = { url = github:nix-systems/default; }; systems = { url = "github:nix-systems/default"; };
git-ignore-nix = { git-ignore-nix = {
url = github:hercules-ci/gitignore.nix; url = "github:hercules-ci/gitignore.nix";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
gtk-sni-tray = { gtk-sni-tray = {
url = github:taffybar/gtk-sni-tray; url = "github:taffybar/gtk-sni-tray";
inputs = { inputs = {
nixpkgs.follows = "nixpkgs"; nixpkgs.follows = "nixpkgs";
flake-utils.follows = "flake-utils"; flake-utils.follows = "flake-utils";
@ -86,7 +86,7 @@
}; };
status-notifier-item = { status-notifier-item = {
url = github:taffybar/status-notifier-item; url = "github:taffybar/status-notifier-item";
inputs = { inputs = {
nixpkgs.follows = "nixpkgs"; nixpkgs.follows = "nixpkgs";
flake-utils.follows = "flake-utils"; flake-utils.follows = "flake-utils";
@ -95,7 +95,7 @@
}; };
gtk-strut = { gtk-strut = {
url = github:taffybar/gtk-strut; url = "github:taffybar/gtk-strut";
inputs = { inputs = {
nixpkgs.follows = "nixpkgs"; nixpkgs.follows = "nixpkgs";
flake-utils.follows = "flake-utils"; flake-utils.follows = "flake-utils";
@ -103,11 +103,11 @@
}; };
}; };
nixpkgs-regression = { url = github:NixOS/nixpkgs; }; nixpkgs-regression = { url = "github:NixOS/nixpkgs"; };
nixified-ai = { url = github:nixified-ai/flake; }; nixified-ai = { url = "github:nixified-ai/flake"; };
nixos-wsl = { url = github:nix-community/NixOS-WSL; }; nixos-wsl = { url = "github:nix-community/NixOS-WSL"; };
}; };
outputs = inputs@{ outputs = inputs@{