mirror of
https://github.com/NotAShelf/nvf.git
synced 2025-02-21 10:58:01 +00:00
dap: appease the nix gods (fix statix lint)
This commit is contained in:
parent
3b7a11cb42
commit
20302afeca
1 changed files with 54 additions and 50 deletions
|
@ -16,9 +16,10 @@
|
|||
in {
|
||||
config = mkMerge [
|
||||
(mkIf cfg.enable {
|
||||
vim.startPlugins = ["nvim-dap"];
|
||||
vim = {
|
||||
startPlugins = ["nvim-dap"];
|
||||
|
||||
vim.pluginRC =
|
||||
pluginRC =
|
||||
{
|
||||
# TODO customizable keymaps
|
||||
nvim-dap = entryAnywhere ''
|
||||
|
@ -28,7 +29,7 @@ in {
|
|||
}
|
||||
// mapAttrs (_: v: (entryAfter ["nvim-dap"] v)) cfg.sources;
|
||||
|
||||
vim.maps.normal = mkMerge [
|
||||
maps.normal = mkMerge [
|
||||
(mkSetLuaBinding mappings.continue "require('dap').continue")
|
||||
(mkSetLuaBinding mappings.restart "require('dap').restart")
|
||||
(mkSetLuaBinding mappings.terminate "require('dap').terminate")
|
||||
|
@ -47,11 +48,13 @@ in {
|
|||
(mkSetLuaBinding mappings.goUp "require('dap').up")
|
||||
(mkSetLuaBinding mappings.goDown "require('dap').down")
|
||||
];
|
||||
};
|
||||
})
|
||||
(mkIf (cfg.enable && cfg.ui.enable) {
|
||||
vim.startPlugins = ["nvim-nio"];
|
||||
vim = {
|
||||
startPlugins = ["nvim-nio"];
|
||||
|
||||
vim.lazy.plugins = [
|
||||
lazy.plugins = [
|
||||
{
|
||||
package = "nvim-dap-ui";
|
||||
setupModule = "dapui";
|
||||
|
@ -63,7 +66,7 @@ in {
|
|||
}
|
||||
];
|
||||
|
||||
vim.pluginRC.nvim-dap-ui = entryAfter ["nvim-dap"] (
|
||||
pluginRC.nvim-dap-ui = entryAfter ["nvim-dap"] (
|
||||
optionalString cfg.ui.autoStart ''
|
||||
dap.listeners.after.event_initialized["dapui_config"] = function()
|
||||
require("dapui").open()
|
||||
|
@ -76,6 +79,7 @@ in {
|
|||
end
|
||||
''
|
||||
);
|
||||
};
|
||||
})
|
||||
];
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue