mirror of
https://github.com/nix-community/nixvim.git
synced 2025-12-23 17:31:13 +01:00
plugins/rustaceanvim: set default_settings to lua-types.anything instead of submodule
This commit is contained in:
parent
ac9833fdcd
commit
a99d8389c9
1 changed files with 13 additions and 18 deletions
|
|
@ -248,26 +248,21 @@ in
|
||||||
```
|
```
|
||||||
'';
|
'';
|
||||||
|
|
||||||
default_settings =
|
default_settings = lib.nixvim.mkNullOrStrLuaFnOr lib.nixvim.lua-types.anything ''
|
||||||
lib.nixvim.mkNullOrStrLuaFnOr
|
Setting passed to rust-analyzer.
|
||||||
(types.submodule {
|
Defaults to a function that looks for a `rust-analyzer.json` file or returns an empty table.
|
||||||
freeformType = with types; attrsOf anything;
|
See https://rust-analyzer.github.io/manual.html#configuration.
|
||||||
})
|
|
||||||
''
|
|
||||||
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:
|
This can also be the definition of a function:
|
||||||
`fun(project_root:string|nil, default_settings: table|nil):table`
|
`fun(project_root:string|nil, default_settings: table|nil):table`
|
||||||
|
|
||||||
Plugin default:
|
Plugin default:
|
||||||
```lua
|
```lua
|
||||||
function(project_root, default_settings)
|
function(project_root, default_settings)
|
||||||
return require('rustaceanvim.config.server').load_rust_analyzer_settings(project_root, { default_settings = default_settings })
|
return require('rustaceanvim.config.server').load_rust_analyzer_settings(project_root, { default_settings = default_settings })
|
||||||
end
|
end
|
||||||
```
|
```
|
||||||
'';
|
'';
|
||||||
|
|
||||||
standalone = lib.nixvim.defaultNullOpts.mkBool true ''
|
standalone = lib.nixvim.defaultNullOpts.mkBool true ''
|
||||||
Standalone file support (enabled by default).
|
Standalone file support (enabled by default).
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue