1
0
Fork 0
mirror of https://github.com/nix-community/nixvim.git synced 2025-12-23 09:21:15 +01:00

plugins/rustaceanvim: set default_settings to lua-types.anything instead of submodule

This commit is contained in:
Gaetan Lepage 2025-12-21 23:58:36 +01:00 committed by Gaétan Lepage
parent ac9833fdcd
commit a99d8389c9

View file

@ -248,26 +248,21 @@ in
```
'';
default_settings =
lib.nixvim.mkNullOrStrLuaFnOr
(types.submodule {
freeformType = with types; attrsOf anything;
})
''
Setting passed to rust-analyzer.
Defaults to a function that looks for a `rust-analyzer.json` file or returns an empty table.
See https://rust-analyzer.github.io/manual.html#configuration.
default_settings = lib.nixvim.mkNullOrStrLuaFnOr lib.nixvim.lua-types.anything ''
Setting passed to rust-analyzer.
Defaults to a function that looks for a `rust-analyzer.json` file or returns an empty table.
See https://rust-analyzer.github.io/manual.html#configuration.
This can also be the definition of a function:
`fun(project_root:string|nil, default_settings: table|nil):table`
This can also be the definition of a function:
`fun(project_root:string|nil, default_settings: table|nil):table`
Plugin default:
```lua
function(project_root, default_settings)
return require('rustaceanvim.config.server').load_rust_analyzer_settings(project_root, { default_settings = default_settings })
end
```
'';
Plugin default:
```lua
function(project_root, default_settings)
return require('rustaceanvim.config.server').load_rust_analyzer_settings(project_root, { default_settings = default_settings })
end
```
'';
standalone = lib.nixvim.defaultNullOpts.mkBool true ''
Standalone file support (enabled by default).