diff --git a/modules/programs/editors/default.nix b/modules/programs/editors/default.nix index f3db4f5..d37ae14 100644 --- a/modules/programs/editors/default.nix +++ b/modules/programs/editors/default.nix @@ -7,7 +7,7 @@ inherit (config.local.systemVars) username; in { imports = [ - ./neovim.nix + ./neovim ]; config = mkIf config.local.profiles.desktop.enable { diff --git a/modules/programs/editors/neovim/basedpyright-fix.nix b/modules/programs/editors/neovim/basedpyright-fix.nix new file mode 100644 index 0000000..331bfbb --- /dev/null +++ b/modules/programs/editors/neovim/basedpyright-fix.nix @@ -0,0 +1,15 @@ +# thanks https://gitlab.com/fazzi/nixohess/-/blob/3e0544761d7f0361e7a8ac7b15714515e7fd5e7c/overlays/basedpyright-fix.nix +_: { + nixpkgs.overlays = [ + (_: prev: { + basedpyright = prev.basedpyright.overrideAttrs (old: { + postInstall = + old.postInstall + + '' + # Remove dangling symlinks created during installation (remove -delete to just see the files, or -print '%l\n' to see the target + find -L $out -type l -print -delete + ''; + }); + }) + ]; +} diff --git a/modules/programs/editors/neovim.nix b/modules/programs/editors/neovim/default.nix similarity index 99% rename from modules/programs/editors/neovim.nix rename to modules/programs/editors/neovim/default.nix index ba5b9ae..e74487d 100644 --- a/modules/programs/editors/neovim.nix +++ b/modules/programs/editors/neovim/default.nix @@ -242,6 +242,7 @@ }; }; in { + imports = [./basedpyright-fix.nix]; config = lib.mkIf config.local.profiles.desktop.enable { hjem.users.${username} = { packages = [customNeovim.neovim];