From 3afd67e5cd64a8f165f6d7c42e08920b881d06f0 Mon Sep 17 00:00:00 2001 From: Alyxia Sother Date: Fri, 9 Jun 2023 18:50:35 +0200 Subject: [PATCH] [nix] Fix bugs and switch to nil for nix lsp --- nix/hosts/alymac/default.nix | 2 -- nix/hosts/alymac/git.nix | 2 +- nix/hosts/alymac/nvim.nix | 10 +++++++--- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/nix/hosts/alymac/default.nix b/nix/hosts/alymac/default.nix index 84340e8..7e59126 100644 --- a/nix/hosts/alymac/default.nix +++ b/nix/hosts/alymac/default.nix @@ -21,7 +21,6 @@ let ffmpeg fzf gh - # git # already managed by home-manager git-crypt gitui gnupg @@ -29,7 +28,6 @@ let kubectl kubelogin-oidc mosh - # neovim # already managed by home-manager nixpkgs-fmt ripgrep sops diff --git a/nix/hosts/alymac/git.nix b/nix/hosts/alymac/git.nix index ed686b0..76f662c 100644 --- a/nix/hosts/alymac/git.nix +++ b/nix/hosts/alymac/git.nix @@ -1,4 +1,4 @@ -{ dotfiles, ... }: +{ pkgs, dotfiles, ... }: { programs.git = { diff --git a/nix/hosts/alymac/nvim.nix b/nix/hosts/alymac/nvim.nix index 8b4f953..12e2b5e 100644 --- a/nix/hosts/alymac/nvim.nix +++ b/nix/hosts/alymac/nvim.nix @@ -1,4 +1,4 @@ -{ dotfiles, ... }: +{ pkgs, dotfiles, ... }: { programs.neovim = { @@ -11,10 +11,14 @@ enable = true; settings = { - languageServer = { + languageserver = { nix = { - command = "rnix-lsp"; + command = "nil"; filetypes = [ "nix" ]; + rootPatterns = [ "flake.nix" ]; + "settings.nil" = { + "formatting.command" = ["nixpkgs-fmt"]; + }; }; "go.goPlsOptions" = { completion = true;