language/clang: use new dap config format

This commit is contained in:
Ching Pei Yang 2026-06-13 00:07:24 +02:00
commit 987867905e
No known key found for this signature in database
GPG key ID: B3841364253DC4C8
5 changed files with 65 additions and 34 deletions

View file

@ -1,5 +1,6 @@
{
imports = [
./presets
./config.nix
./nvim-dap.nix
];

View file

@ -0,0 +1,5 @@
{
imports = [
./lldb.nix
];
}

View file

@ -0,0 +1,22 @@
{
lib,
pkgs,
config,
...
}: let
inherit (lib.modules) mkIf;
inherit (lib.options) mkEnableOption;
cfg = config.vim.debugger.nvim-dap.presets.lldb;
in {
options.vim.debugger.nvim-dap.presets.lldb = {
enable = mkEnableOption "LLDB debugger using lldb-dap";
};
config.vim.debugger.nvim-dap.adapters = mkIf cfg.enable {
lldb = {
type = "executable";
command = "${pkgs.lldb}/bin/lldb-dap";
};
};
}