mirror of
https://github.com/NotAShelf/nvf.git
synced 2026-06-14 08:36:57 +00:00
nvim-dap: impl adapters and configurations
This commit is contained in:
parent
1c98cf4079
commit
45f463574e
1 changed files with 19 additions and 1 deletions
|
|
@ -4,11 +4,13 @@
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
|
inherit (builtins) concatStringsSep;
|
||||||
inherit (lib.strings) optionalString;
|
inherit (lib.strings) optionalString;
|
||||||
inherit (lib.modules) mkIf mkMerge;
|
inherit (lib.modules) mkIf mkMerge;
|
||||||
inherit (lib.attrsets) mapAttrs;
|
inherit (lib.attrsets) mapAttrs mapAttrsToList;
|
||||||
inherit (lib.nvim.binds) mkKeymap;
|
inherit (lib.nvim.binds) mkKeymap;
|
||||||
inherit (lib.nvim.dag) entryAnywhere entryAfter;
|
inherit (lib.nvim.dag) entryAnywhere entryAfter;
|
||||||
|
inherit (lib.nvim.lua) toLuaObject;
|
||||||
|
|
||||||
cfg = config.vim.debugger.nvim-dap;
|
cfg = config.vim.debugger.nvim-dap;
|
||||||
opt = {
|
opt = {
|
||||||
|
|
@ -28,6 +30,22 @@ in {
|
||||||
nvim-dap = entryAnywhere ''
|
nvim-dap = entryAnywhere ''
|
||||||
local dap = require("dap")
|
local dap = require("dap")
|
||||||
vim.fn.sign_define("DapBreakpoint", { text = "🛑", texthl = "ErrorMsg", linehl = "", numhl = "" })
|
vim.fn.sign_define("DapBreakpoint", { text = "🛑", texthl = "ErrorMsg", linehl = "", numhl = "" })
|
||||||
|
|
||||||
|
${
|
||||||
|
concatStringsSep "\n"
|
||||||
|
(mapAttrsToList (name: opts: ''
|
||||||
|
dap.adapters[${toLuaObject name}] = ${toLuaObject opts}
|
||||||
|
'')
|
||||||
|
cfg.adapters)
|
||||||
|
}
|
||||||
|
|
||||||
|
${
|
||||||
|
concatStringsSep "\n"
|
||||||
|
(mapAttrsToList (ft: opts: ''
|
||||||
|
dap.configurations[${toLuaObject ft}] = ${toLuaObject opts}
|
||||||
|
'')
|
||||||
|
cfg.configurations)
|
||||||
|
}
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
// mapAttrs (_: v: (entryAfter ["nvim-dap"] v)) cfg.sources;
|
// mapAttrs (_: v: (entryAfter ["nvim-dap"] v)) cfg.sources;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue