mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-23 17:28:39 +02:00
plugins/rustaceanvim: update options
This commit is contained in:
parent
d844ac1a06
commit
53697141b5
1 changed files with 110 additions and 76 deletions
|
@ -27,16 +27,48 @@ in
|
|||
example = null;
|
||||
};
|
||||
|
||||
tools = {
|
||||
executor = helpers.defaultNullOpts.mkNullable (
|
||||
with helpers.nixvimTypes;
|
||||
either strLuaFn (enum [
|
||||
tools =
|
||||
let
|
||||
executors = [
|
||||
"termopen"
|
||||
"quickfix"
|
||||
"toggleterm"
|
||||
"vimux"
|
||||
])
|
||||
) "termopen" "How to execute terminal commands.";
|
||||
"neotest"
|
||||
];
|
||||
testExecutors = executors ++ [ "background" ];
|
||||
in
|
||||
{
|
||||
executor = helpers.defaultNullOpts.mkEnum executors "termopen" ''
|
||||
`{execute_command} (fun(cmd:string,args:string[],cwd:string|nil,opts?:RustaceanExecutorOpts))`
|
||||
The executor to use for runnables/debuggables.
|
||||
|
||||
Example:
|
||||
```lua
|
||||
{
|
||||
execute_command = function(command, args, cwd, _)
|
||||
require('toggleterm.terminal').Terminal
|
||||
:new({
|
||||
dir = cwd,
|
||||
cmd = require('rustaceanvim.shell').make_command_from_args(command, args),
|
||||
close_on_exit = false,
|
||||
direction = 'vertical',
|
||||
})
|
||||
:toggle()
|
||||
end
|
||||
}
|
||||
```
|
||||
'';
|
||||
|
||||
testExecutor = helpers.defaultNullOpts.mkEnum testExecutors "termopen" ''
|
||||
`{execute_command} (fun(cmd:string,args:string[],cwd:string|nil,opts?:RustaceanExecutorOpts))`
|
||||
The executor to use for runnables that are tests/testables
|
||||
'';
|
||||
|
||||
crateTestExecutor = helpers.defaultNullOpts.mkEnum testExecutors "termopen" ''
|
||||
`{execute_command} (fun(cmd:string,args:string[],cwd:string|nil,opts?:RustaceanExecutorOpts))`
|
||||
The executor to use for runnables that are crate test suites (--all-targets)
|
||||
'';
|
||||
|
||||
onInitialized = helpers.mkNullOrLuaFn ''
|
||||
`fun(health:RustAnalyzerInitializedStatus)`
|
||||
|
@ -238,6 +270,8 @@ in
|
|||
{
|
||||
tools = with tools; {
|
||||
inherit executor;
|
||||
test_executor = testExecutor;
|
||||
crate_test_executor = crateTestExecutor;
|
||||
on_initialized = onInitialized;
|
||||
reload_workspace_from_cargo_toml = reloadWorkspaceFromCargoToml;
|
||||
hover_actions = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue