Skip to content

Commit

Permalink
languages/nix: deprecate rnix language server option
Browse files Browse the repository at this point in the history
Abandoned, archived and wildly outdated.
  • Loading branch information
NotAShelf committed Jan 10, 2025
1 parent c09ae38 commit c734a81
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 92 deletions.
73 changes: 0 additions & 73 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@
};

# Language servers (use master instead of nixpkgs)
rnix-lsp.url = "github:nix-community/rnix-lsp";
nil = {
url = "github:oxalica/nil";
inputs.nixpkgs.follows = "nixpkgs";
Expand Down
4 changes: 3 additions & 1 deletion flake/legacyPackages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,10 @@
inherit system;
overlays = [
inputs.self.overlays.default

(_: _: {
rnix-lsp = inputs'.rnix-lsp.defaultPackage;
# Build nil from source to get most recent
# features as they are added.
nil = inputs'.nil.packages.default;
})
];
Expand Down
30 changes: 13 additions & 17 deletions modules/plugins/languages/nix.nix
Original file line number Diff line number Diff line change
Expand Up @@ -26,22 +26,6 @@
then expToLua package
else ''{"${package}/bin/${defaultCmd}"}'';
servers = {
rnix = {
package = pkgs.rnix-lsp;
internalFormatter = cfg.format.type == "nixpkgs-fmt";
lspConfig = ''
lspconfig.rnix.setup{
capabilities = capabilities,
${
if (cfg.format.enable && cfg.format.type == "nixpkgs-fmt")
then useFormat
else noFormat
},
cmd = ${packageToCmd cfg.lsp.package "rnix-lsp"},
}
'';
};

nil = {
package = pkgs.nil;
internalFormatter = true;
Expand Down Expand Up @@ -165,6 +149,7 @@ in {
type = enum (attrNames formats);
default = defaultFormat;
};

package = mkOption {
description = "Nix formatter package";
type = package;
Expand All @@ -188,7 +173,18 @@ in {
assertions = [
{
assertion = cfg.format.type != "nixpkgs-fmt";
message = "nixpkgs-fmt has been archived upstream. Please use one of the following instead: ${concatStringsSep ", " (attrNames formats)}";
message = ''
nixpkgs-fmt has been archived upstream. Please use one of the following available formatters:
${concatStringsSep ", " (attrNames formats)}
'';
}

{
assertion = cfg.lsp.server != "rnix";
message = ''
rnix-lsp has been archived upstream. Please use one of the following available language servers:
${concatStringsSep ", " (attrNames servers)}
'';
}
];
vim.pluginRC.nix = ''
Expand Down

0 comments on commit c734a81

Please sign in to comment.