dev: init nvim-dap setup

This commit is contained in:
NotAShelf 2023-05-04 18:41:11 +03:00 committed by Ching Pei Yang
commit 640e37bd08
9 changed files with 100 additions and 0 deletions

View file

@ -0,0 +1,5 @@
_: {
imports = [
./nvim-dap
];
}

View file

@ -0,0 +1,23 @@
{
config,
lib,
...
}:
with lib;
with builtins; let
cfg = config.vim.debugger.nvim-dap;
in {
config = mkIf cfg.enable {
vim.startPlugins =
[
"nvim-dap"
]
++ optionals cfg.ui.enable [
"nvim-dap-ui"
];
vim.luaConfigRC.nvim-dap-ui = nvim.dag.entryAnywhere ''
require("dapui").setup()
'';
};
}

View file

@ -0,0 +1,6 @@
_: {
imports = [
./config.nix
./nvim-dap.nix
];
}

View file

@ -0,0 +1,10 @@
{lib, ...}:
with lib; {
options.vim.debugger.nvim-dap = {
enable = mkEnableOption "Enable debugging via nvim-dap";
ui = {
enable = mkEnableOption "Enable UI extension for nvim-dap";
};
};
}