mirror of
https://github.com/nix-community/nixvim.git
synced 2025-07-13 10:44:34 +02:00
treewide: Reformat with nixfmt
This commit is contained in:
parent
c6281260dc
commit
62f32bfc71
459 changed files with 28139 additions and 26377 deletions
|
@ -5,70 +5,70 @@
|
|||
pkgs,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
with lib;
|
||||
let
|
||||
cfg = config.plugins.dap;
|
||||
dapHelpers = import ./dapHelpers.nix {inherit lib helpers;};
|
||||
dapHelpers = import ./dapHelpers.nix { inherit lib helpers; };
|
||||
in
|
||||
with dapHelpers; {
|
||||
imports = [
|
||||
./dap-go.nix
|
||||
./dap-python.nix
|
||||
./dap-ui.nix
|
||||
./dap-virtual-text.nix
|
||||
];
|
||||
with dapHelpers;
|
||||
{
|
||||
imports = [
|
||||
./dap-go.nix
|
||||
./dap-python.nix
|
||||
./dap-ui.nix
|
||||
./dap-virtual-text.nix
|
||||
];
|
||||
|
||||
options.plugins.dap =
|
||||
helpers.neovim-plugin.extraOptionsOptions
|
||||
// {
|
||||
enable = mkEnableOption "dap";
|
||||
options.plugins.dap = helpers.neovim-plugin.extraOptionsOptions // {
|
||||
enable = mkEnableOption "dap";
|
||||
|
||||
package = helpers.mkPackageOption "dap" pkgs.vimPlugins.nvim-dap;
|
||||
package = helpers.mkPackageOption "dap" pkgs.vimPlugins.nvim-dap;
|
||||
|
||||
adapters = helpers.mkCompositeOption "Dap adapters." {
|
||||
executables = mkAdapterOption "executable" executableAdapterOption;
|
||||
servers = mkAdapterOption "server" serverAdapterOption;
|
||||
};
|
||||
adapters = helpers.mkCompositeOption "Dap adapters." {
|
||||
executables = mkAdapterOption "executable" executableAdapterOption;
|
||||
servers = mkAdapterOption "server" serverAdapterOption;
|
||||
};
|
||||
|
||||
configurations = helpers.mkNullOrOption (with types; attrsOf (listOf dapHelpers.configurationOption)) ''
|
||||
configurations =
|
||||
helpers.mkNullOrOption (with types; attrsOf (listOf dapHelpers.configurationOption))
|
||||
''
|
||||
Debuggee configurations, see `:h dap-configuration` for more info.
|
||||
'';
|
||||
|
||||
signs = helpers.mkCompositeOption "Signs for dap." {
|
||||
dapBreakpoint = mkSignOption "B" "Sign for breakpoints.";
|
||||
signs = helpers.mkCompositeOption "Signs for dap." {
|
||||
dapBreakpoint = mkSignOption "B" "Sign for breakpoints.";
|
||||
|
||||
dapBreakpointCondition = mkSignOption "C" "Sign for conditional breakpoints.";
|
||||
dapBreakpointCondition = mkSignOption "C" "Sign for conditional breakpoints.";
|
||||
|
||||
dapLogPoint = mkSignOption "L" "Sign for log points.";
|
||||
dapLogPoint = mkSignOption "L" "Sign for log points.";
|
||||
|
||||
dapStopped = mkSignOption "→" "Sign to indicate where the debuggee is stopped.";
|
||||
dapStopped = mkSignOption "→" "Sign to indicate where the debuggee is stopped.";
|
||||
|
||||
dapBreakpointRejected = mkSignOption "R" "Sign to indicate breakpoints rejected by the debug adapter.";
|
||||
};
|
||||
dapBreakpointRejected = mkSignOption "R" "Sign to indicate breakpoints rejected by the debug adapter.";
|
||||
};
|
||||
|
||||
extensionConfigLua = mkOption {
|
||||
type = types.lines;
|
||||
description = ''
|
||||
Extension configuration for dap. Don't use this directly !
|
||||
'';
|
||||
default = "";
|
||||
internal = true;
|
||||
};
|
||||
};
|
||||
extensionConfigLua = mkOption {
|
||||
type = types.lines;
|
||||
description = ''
|
||||
Extension configuration for dap. Don't use this directly !
|
||||
'';
|
||||
default = "";
|
||||
internal = true;
|
||||
};
|
||||
};
|
||||
|
||||
config = let
|
||||
options = with cfg;
|
||||
config =
|
||||
let
|
||||
options =
|
||||
with cfg;
|
||||
{
|
||||
inherit configurations;
|
||||
|
||||
adapters =
|
||||
(
|
||||
lib.optionalAttrs (adapters.executables != null)
|
||||
(processAdapters "executable" adapters.executables)
|
||||
)
|
||||
// (
|
||||
lib.optionalAttrs (adapters.servers != null)
|
||||
(processAdapters "server" adapters.servers)
|
||||
);
|
||||
(lib.optionalAttrs (adapters.executables != null) (
|
||||
processAdapters "executable" adapters.executables
|
||||
))
|
||||
// (lib.optionalAttrs (adapters.servers != null) (processAdapters "server" adapters.servers));
|
||||
|
||||
signs = with signs; {
|
||||
DapBreakpoint = dapBreakpoint;
|
||||
|
@ -80,22 +80,22 @@ in
|
|||
}
|
||||
// cfg.extraOptions;
|
||||
in
|
||||
mkIf cfg.enable {
|
||||
extraPlugins = [cfg.package];
|
||||
mkIf cfg.enable {
|
||||
extraPlugins = [ cfg.package ];
|
||||
|
||||
extraConfigLua =
|
||||
(optionalString (cfg.adapters != null) ''
|
||||
require("dap").adapters = ${helpers.toLuaObject options.adapters}
|
||||
'')
|
||||
+ (optionalString (options.configurations != null) ''
|
||||
require("dap").configurations = ${helpers.toLuaObject options.configurations}
|
||||
'')
|
||||
+ (optionalString (cfg.signs != null) ''
|
||||
local __dap_signs = ${helpers.toLuaObject options.signs}
|
||||
for sign_name, sign in pairs(__dap_signs) do
|
||||
vim.fn.sign_define(sign_name, sign)
|
||||
end
|
||||
'')
|
||||
+ cfg.extensionConfigLua;
|
||||
};
|
||||
}
|
||||
extraConfigLua =
|
||||
(optionalString (cfg.adapters != null) ''
|
||||
require("dap").adapters = ${helpers.toLuaObject options.adapters}
|
||||
'')
|
||||
+ (optionalString (options.configurations != null) ''
|
||||
require("dap").configurations = ${helpers.toLuaObject options.configurations}
|
||||
'')
|
||||
+ (optionalString (cfg.signs != null) ''
|
||||
local __dap_signs = ${helpers.toLuaObject options.signs}
|
||||
for sign_name, sign in pairs(__dap_signs) do
|
||||
vim.fn.sign_define(sign_name, sign)
|
||||
end
|
||||
'')
|
||||
+ cfg.extensionConfigLua;
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue