From 31d8735e971b32bbcd1d3b64f1e03cf527f88a05 Mon Sep 17 00:00:00 2001 From: Crony Akatsuki Date: Tue, 11 Feb 2025 14:03:07 +0100 Subject: [PATCH] Using specific nvf pr for nixd options. --- flake.lock | 45 +++++---------------------------- flake.nix | 8 +++++- modules/home-manager/neovim.nix | 37 ++++++++------------------- 3 files changed, 24 insertions(+), 66 deletions(-) diff --git a/flake.lock b/flake.lock index 77fcb61..552702e 100644 --- a/flake.lock +++ b/flake.lock @@ -396,8 +396,6 @@ "plugin-aerial-nvim": "plugin-aerial-nvim", "plugin-alpha-nvim": "plugin-alpha-nvim", "plugin-base16": "plugin-base16", - "plugin-blink-cmp": "plugin-blink-cmp", - "plugin-blink-compat": "plugin-blink-compat", "plugin-bufdelete-nvim": "plugin-bufdelete-nvim", "plugin-catppuccin": "plugin-catppuccin", "plugin-ccc": "plugin-ccc", @@ -564,15 +562,16 @@ "systems": "systems_2" }, "locked": { - "lastModified": 1739089639, - "narHash": "sha256-MCkgsVTAtoVUthorcCeit1oBuFyG7XktYdeMzyHL2uE=", - "owner": "notashelf", + "lastModified": 1739247236, + "narHash": "sha256-Oj7coDcvhenqgBZJA49+9X0VDG3maN0590WuCxi4AWc=", + "owner": "iynaix", "repo": "nvf", - "rev": "a78026438cc8e280a696bcadb60f5c8f93b96a12", + "rev": "c116b7224b2c4ecd20ac90e410b65e36ada7c86c", "type": "github" }, "original": { - "owner": "notashelf", + "owner": "iynaix", + "ref": "add-nixd-opts", "repo": "nvf", "type": "github" } @@ -625,38 +624,6 @@ "type": "github" } }, - "plugin-blink-cmp": { - "flake": false, - "locked": { - "lastModified": 1736295934, - "narHash": "sha256-MfHI4efAdaoCU8si6YFdznZmSTprthDq3YKuF91z7ss=", - "owner": "saghen", - "repo": "blink.cmp", - "rev": "1cc3b1a908fbcfd15451c4772759549724f38524", - "type": "github" - }, - "original": { - "owner": "saghen", - "repo": "blink.cmp", - "type": "github" - } - }, - "plugin-blink-compat": { - "flake": false, - "locked": { - "lastModified": 1734896240, - "narHash": "sha256-Rrrh+O3FbBnaAnCHwPuQyfhH+XueSkQp6ipEkn6esGY=", - "owner": "saghen", - "repo": "blink.compat", - "rev": "74b251a1e9478c4fa6d7c6bc2921d7124e6f6cbb", - "type": "github" - }, - "original": { - "owner": "saghen", - "repo": "blink.compat", - "type": "github" - } - }, "plugin-bufdelete-nvim": { "flake": false, "locked": { diff --git a/flake.nix b/flake.nix index d5a89b4..6c79304 100644 --- a/flake.nix +++ b/flake.nix @@ -18,8 +18,14 @@ }; # NVF FOR SUPER NVIM + # nvf = { + # url = "github:notashelf/nvf"; + # inputs.nixpkgs.follows = "nixpkgs"; + # }; + + # Test out specific nvf pr nvf = { - url = "github:notashelf/nvf"; + url = "github:iynaix/nvf/add-nixd-opts"; inputs.nixpkgs.follows = "nixpkgs"; }; diff --git a/modules/home-manager/neovim.nix b/modules/home-manager/neovim.nix index 31d01cc..3d10e44 100644 --- a/modules/home-manager/neovim.nix +++ b/modules/home-manager/neovim.nix @@ -69,7 +69,17 @@ }; nix = { enable = true; - lsp.server = "nixd"; + lsp = { + server = "nixd"; + options = { + nixos = { + expr = ''(builtins.getFlake "/home/crony/Repos/nixos").nixosConfigurations.CONFIGNAME.options''; + }; + home_manager = { + expr = ''(builtins.getFlake "/home/crony/Repos/nixos").homeConfigurations.CONFIGNAME.options''; + }; + }; + }; }; bash.enable = true; go.enable = true; @@ -82,31 +92,6 @@ # Setup snippet support snippets.luasnip.enable = true; - # Setup nixd options - luaConfigRC.nixd = '' - require("lspconfig").nixd.setup({ - cmd = { "${pkgs.nixd}/bin/nixd" }, - settings = { - nixd = { - nixpkgs = { - expr = "import { }", - }, - formatting = { - command = { "${pkgs.alejandra}/bin/alejandra", "--quiet" }, - }, - options = { - nixos = { - expr = '(builtins.getFlake "/home/crony/Repos/nixos").nixosConfigurations.CONFIGNAME.options', - }, - home_manager = { - expr = '(builtins.getFlake "/home/crony/Repos/nixos").homeConfigurations.CONFIGNAME.options', - }, - }, - }, - }, - }) - ''; - # Enable mini modules ( mini is amazing ) mini = { # Text editing