Skip to content

Commit

Permalink
Merge pull request #547 from NotAShelf/deprecate-rnix
Browse files Browse the repository at this point in the history
languages/nix: deprecate rnix language server option
  • Loading branch information
NotAShelf authored Jan 10, 2025
2 parents 2c54ecd + c5f16b9 commit c8dbcde
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 95 deletions.
8 changes: 5 additions & 3 deletions docs/release-notes/rl-0.8.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,11 @@
warning you that it is invalid. Do keep in mind that this value is no longer
checked, so you will be responsible for ensuring its validity.

- Deprecated `vim.enableEditorconfig` in favor of
- Deprecate `vim.enableEditorconfig` in favor of
[](#opt-vim.globals.editorconfig).

- Deprecate rnix-lsp as it has been abandoned and archived upstream.

[amadaluzia](https://github.com/amadaluzia):

[haskell-tools.nvim]: https://github.com/MrcJkb/haskell-tools.nvim
Expand All @@ -47,5 +49,5 @@

[LilleAila](https://github.com/LilleAila):

- Remove `vim.notes.obsidian.setupOpts.dir`, which was set by default.
Fixes issue with setting the workspace directory.
- Remove `vim.notes.obsidian.setupOpts.dir`, which was set by default. Fixes
issue with setting the workspace directory.
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 c8dbcde

Please sign in to comment.