mirror of
https://github.com/nix-community/nixvim.git
synced 2025-08-28 05:54:13 +02:00
plugins/dap: add pipe type adapter
Some checks failed
Publish every Git push to main to FlakeHub / flakehub-publish (push) Has been cancelled
Publish every git push to Flakestry / publish-flake (push) Has been cancelled
Documentation / Version info (push) Has been cancelled
Documentation / Build (push) Has been cancelled
Documentation / Combine builds (push) Has been cancelled
Documentation / Deploy (push) Has been cancelled
Some checks failed
Publish every Git push to main to FlakeHub / flakehub-publish (push) Has been cancelled
Publish every git push to Flakestry / publish-flake (push) Has been cancelled
Documentation / Version info (push) Has been cancelled
Documentation / Build (push) Has been cancelled
Documentation / Combine builds (push) Has been cancelled
Documentation / Deploy (push) Has been cancelled
This commit is contained in:
parent
ecc7880e00
commit
e1e4bb83f1
2 changed files with 23 additions and 0 deletions
|
@ -77,6 +77,25 @@ rec {
|
|||
'';
|
||||
};
|
||||
|
||||
pipeAdapterOption = mkAdapterType {
|
||||
pipe = lib.nixvim.defaultNullOpts.mkStr "$\{pipe}" "Pipe name.";
|
||||
|
||||
executable = {
|
||||
command = mkNullOrOption types.str "Command that spawns the adapter.";
|
||||
|
||||
args = mkNullOrOption (types.listOf types.str) "Command arguments.";
|
||||
|
||||
detached = lib.nixvim.defaultNullOpts.mkBool true "Spawn the debug adapter in detached state.";
|
||||
|
||||
cwd = mkNullOrOption types.str "Working directory.";
|
||||
};
|
||||
|
||||
options.timeout = lib.nixvim.defaultNullOpts.mkInt 5000 ''
|
||||
Max amount of time in ms to wait between spaning the executable and connecting to the pipe.
|
||||
This gives the executable time to create the pipe
|
||||
'';
|
||||
};
|
||||
|
||||
mkAdapterOption =
|
||||
name: type:
|
||||
mkNullOrOption (with types; attrsOf (either str type)) ''
|
||||
|
|
|
@ -26,6 +26,7 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
|||
adapters = lib.nixvim.mkCompositeOption "Dap adapters." {
|
||||
executables = dapHelpers.mkAdapterOption "executable" dapHelpers.executableAdapterOption;
|
||||
servers = dapHelpers.mkAdapterOption "server" dapHelpers.serverAdapterOption;
|
||||
pipes = dapHelpers.mkAdapterOption "pipe" dapHelpers.pipeAdapterOption;
|
||||
};
|
||||
|
||||
configurations =
|
||||
|
@ -70,6 +71,9 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
|||
))
|
||||
// (lib.optionalAttrs (cfg.adapters.servers != null) (
|
||||
dapHelpers.processAdapters "server" cfg.adapters.servers
|
||||
))
|
||||
// (lib.optionalAttrs (cfg.adapters.pipes != null) (
|
||||
dapHelpers.processAdapters "pipe" cfg.adapters.pipes
|
||||
));
|
||||
|
||||
signs = with cfg.signs; {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue