mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-22 08:53:28 +02:00
plugin/rustaceanvim: Handle rust-analyzer settings rename
This commit is contained in:
parent
34c3c026b4
commit
123c102a13
3 changed files with 21 additions and 5 deletions
|
@ -34,7 +34,7 @@ helpers.neovim-plugin.mkNeovimPlugin config {
|
|||
"nightly"
|
||||
"rust-analyzer"
|
||||
];
|
||||
settings = {
|
||||
default_settings = {
|
||||
rust-analyzer = {
|
||||
inlayHints = {
|
||||
lifetimeElisionHints = {
|
||||
|
@ -58,7 +58,23 @@ helpers.neovim-plugin.mkNeovimPlugin config {
|
|||
'';
|
||||
in
|
||||
mkMerge [
|
||||
{ extraPackages = [ cfg.rustAnalyzerPackage ]; }
|
||||
{
|
||||
extraPackages = [ cfg.rustAnalyzerPackage ];
|
||||
# TODO: remove after 24.11
|
||||
warnings =
|
||||
optional
|
||||
(hasAttrByPath [
|
||||
"settings"
|
||||
"server"
|
||||
"settings"
|
||||
] cfg)
|
||||
''
|
||||
The `plugins.rustaceanvim.settings.server.settings' option has been renamed to `plugins.rustaceanvim.settings.server.default_settings'.
|
||||
|
||||
Note that if you supplied an attrset and not a function you need to set this attr set in:
|
||||
`plugins.rustaceanvim.settings.server.default_settings.rust-analyzer'.
|
||||
'';
|
||||
}
|
||||
# If nvim-lspconfig is enabled:
|
||||
(mkIf config.plugins.lsp.enable {
|
||||
# Use the same `on_attach` callback as for the other LSP servers
|
||||
|
|
|
@ -254,10 +254,10 @@ with lib;
|
|||
```
|
||||
'';
|
||||
|
||||
settings =
|
||||
default_settings =
|
||||
helpers.mkNullOrStrLuaFnOr
|
||||
(types.submodule {
|
||||
options = import ../../../lsp/language-servers/rust-analyzer-config.nix lib helpers;
|
||||
options.rust-analyzer = import ../../../lsp/language-servers/rust-analyzer-config.nix lib helpers;
|
||||
freeformType = with types; attrsOf anything;
|
||||
})
|
||||
''
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue