mirror of
https://github.com/nix-community/nixvim.git
synced 2025-07-01 12:54:30 +02:00
plugins: Introduce helpers.defaultNullOpts.mkLuaFn (#855)
This allows to avoid calling `mkRaw` on lua functions, as they will get applied automatically. This could also help in the future to refactor the use of Lua code to make it more user-friendly.
This commit is contained in:
parent
b38dbdb0dc
commit
1d8e7906c9
30 changed files with 140 additions and 119 deletions
|
@ -24,7 +24,7 @@ in {
|
|||
"how to execute terminal commands";
|
||||
|
||||
onInitialized =
|
||||
helpers.defaultNullOpts.mkStr "null"
|
||||
helpers.defaultNullOpts.mkLuaFn "null"
|
||||
''
|
||||
Callback to execute once rust-analyzer is done initializing the workspace
|
||||
The callback receives one parameter indicating the `health` of the server:
|
||||
|
@ -143,7 +143,7 @@ in {
|
|||
helpers.ifNonNull' cfg.executor
|
||||
(helpers.mkRaw "require(${rust-tools.executors}).${cfg.executor}");
|
||||
|
||||
on_initialized = helpers.mkRaw cfg.onInitialized;
|
||||
on_initialized = cfg.onInitialized;
|
||||
|
||||
reload_workspace_from_cargo_toml = cfg.reloadWorkspaceFromCargoToml;
|
||||
inlay_hints = with cfg.inlayHints; {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue