adding debugging
This commit is contained in:
@@ -1,7 +1,12 @@
|
|||||||
{ pkgs, opts, ... }: {
|
{ lib, pkgs, opts, ... }: {
|
||||||
# Import all your configuration modules here
|
# Import all your configuration modules here
|
||||||
imports = [ ./bufferline.nix ];
|
imports = [ ./bufferline.nix ];
|
||||||
|
|
||||||
|
extraPackages = with pkgs; [
|
||||||
|
coreutils
|
||||||
|
lldb_18
|
||||||
|
];
|
||||||
|
|
||||||
plugins = {
|
plugins = {
|
||||||
|
|
||||||
lualine.enable = true;
|
lualine.enable = true;
|
||||||
@@ -161,6 +166,68 @@
|
|||||||
dap = {
|
dap = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
|
adapters = {
|
||||||
|
executables = {
|
||||||
|
lldb = {
|
||||||
|
command = lib.getExe' pkgs.lldb "lldb-vscode";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
servers = {
|
||||||
|
codelldb = {
|
||||||
|
port = 13000;
|
||||||
|
executable = {
|
||||||
|
command = "${pkgs.vscode-extensions.vadimcn.vscode-lldb}/share/vscode/extensions/vadimcn.vscode-lldb/adapter/codelldb";
|
||||||
|
args = [
|
||||||
|
"--port"
|
||||||
|
"13000"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
configurations = let
|
||||||
|
codelldb-config = {
|
||||||
|
name = "Launch (CodeLLDB)";
|
||||||
|
type = "codelldb";
|
||||||
|
request = "launch";
|
||||||
|
program.__raw = ''
|
||||||
|
function()
|
||||||
|
return vim.fn.input("Path to executable: ", vim.fn.getcwd() .. '/', "file")
|
||||||
|
end
|
||||||
|
'';
|
||||||
|
cwd = ''''${workspaceFolder}'';
|
||||||
|
stopOnEntry = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
lldb-config = {
|
||||||
|
name = "Launch (LLDB)";
|
||||||
|
type = "lldb";
|
||||||
|
request = "launch";
|
||||||
|
program.__raw = ''
|
||||||
|
function()
|
||||||
|
return vim.fn.input("Path to executable: ", vim.fn.getcwd() .. '/', "file")
|
||||||
|
end'';
|
||||||
|
cwd = ''''${workspaceFolder}'';
|
||||||
|
stopOnEntry = false;
|
||||||
|
};
|
||||||
|
in {
|
||||||
|
c = [ lldb-config ];
|
||||||
|
|
||||||
|
cpp =
|
||||||
|
[ lldb-config ]
|
||||||
|
++ lib.optionals pkgs.stdenv.isLinux [
|
||||||
|
codelldb-config
|
||||||
|
];
|
||||||
|
|
||||||
|
rust =
|
||||||
|
[ lldb-config ]
|
||||||
|
++ lib.optionals pkgs.stdenv.isLinux [
|
||||||
|
codelldb-config
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
extensions = {
|
extensions = {
|
||||||
# Creates a beautiful debugger UI
|
# Creates a beautiful debugger UI
|
||||||
dap-ui = {
|
dap-ui = {
|
||||||
@@ -193,20 +260,16 @@
|
|||||||
dap-virtual-text.enable = true;
|
dap-virtual-text.enable = true;
|
||||||
|
|
||||||
# Add debuggers here?
|
# Add debuggers here?
|
||||||
dap-lldb = {
|
|
||||||
enable = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
dap-python = {
|
dap-python = {
|
||||||
enable = true;
|
enable = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
/*dap-lldb = {
|
dap-lldb = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
settings.codelldb_path = "${pkgs.vscode-extensions.vadimcn.vscode-lldb}/share/vscode/extensions/vadimcn.vscode-lldb/adapter/codelldb";
|
||||||
};*/
|
};
|
||||||
|
|
||||||
cmp = {
|
cmp = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user