languages/nix: deprecate rnix language server option

Abandoned, archived and wildly outdated.
This commit is contained in:
NotAShelf 2025-01-10 12:52:11 +03:00
parent c09ae380f0
commit c734a81e40
No known key found for this signature in database
GPG key ID: EED98D11B85A2819
4 changed files with 16 additions and 92 deletions

View file

@ -51,27 +51,6 @@
"type": "github"
}
},
"naersk": {
"inputs": {
"nixpkgs": [
"rnix-lsp",
"nixpkgs"
]
},
"locked": {
"lastModified": 1655042882,
"narHash": "sha256-9BX8Fuez5YJlN7cdPO63InoyBy7dm3VlJkkmTt6fS1A=",
"owner": "nix-community",
"repo": "naersk",
"rev": "cddffb5aa211f50c4b8750adbec0bbbdfb26bb9f",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "naersk",
"type": "github"
}
},
"nil": {
"inputs": {
"flake-utils": [
@ -124,22 +103,6 @@
"url": "https://github.com/NixOS/nixpkgs/archive/5487e69da40cbd611ab2cadee0b4637225f7cfae.tar.gz"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1656753965,
"narHash": "sha256-BCrB3l0qpJokOnIVc3g2lHiGhnjUi0MoXiw6t1o8H1E=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "0ea7a8f1b939d74e5df8af9a8f7342097cdf69eb",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nmd": {
"flake": false,
"locked": {
@ -2110,26 +2073,6 @@
"type": "github"
}
},
"rnix-lsp": {
"inputs": {
"naersk": "naersk",
"nixpkgs": "nixpkgs_2",
"utils": "utils"
},
"locked": {
"lastModified": 1669555118,
"narHash": "sha256-F0s0m62S5bHNVWNHLZD6SeHiLrsDx98VQbRjDyIu+qQ=",
"owner": "nix-community",
"repo": "rnix-lsp",
"rev": "95d40673fe43642e2e1144341e86d0036abd95d9",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "rnix-lsp",
"type": "github"
}
},
"root": {
"inputs": {
"flake-parts": "flake-parts",
@ -2260,7 +2203,6 @@
"plugin-vim-repeat": "plugin-vim-repeat",
"plugin-vim-startify": "plugin-vim-startify",
"plugin-which-key": "plugin-which-key",
"rnix-lsp": "rnix-lsp",
"systems": "systems_2"
}
},
@ -2314,21 +2256,6 @@
"repo": "default",
"type": "github"
}
},
"utils": {
"locked": {
"lastModified": 1656928814,
"narHash": "sha256-RIFfgBuKz6Hp89yRr7+NR5tzIAbn52h8vT6vXkYjZoM=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "7e2a3b3dfd9af950a856d66b0a7d01e3c18aa249",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
}
},
"root": "root",

View file

@ -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";

View file

@ -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;
})
];

View file

@ -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;
@ -165,6 +149,7 @@ in {
type = enum (attrNames formats);
default = defaultFormat;
};
package = mkOption {
description = "Nix formatter package";
type = package;
@ -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 = ''