From 52c1f2980411b1c6081e23e164767016d8caad65 Mon Sep 17 00:00:00 2001 From: "Christoph J. Scherr" Date: Mon, 5 Feb 2024 16:47:13 +0100 Subject: [PATCH] its almost some good --- lua/custom/init.lua | 2 +- lua/custom/mappings.lua | 11 +++++++++-- lua/custom/plugins.lua | 30 ++++++++++-------------------- 3 files changed, 20 insertions(+), 23 deletions(-) diff --git a/lua/custom/init.lua b/lua/custom/init.lua index 36ffe70..a510a86 100644 --- a/lua/custom/init.lua +++ b/lua/custom/init.lua @@ -2,7 +2,7 @@ local opt = vim.opt local g = vim.g g.maplocalleader = ";" -opt.mouse = "" -- hardcore vim mode, disable the mouse +opt.mouse = "a" -- mouse does annoying things for me if it's not 'a' opt.signcolumn = "yes" opt.clipboard = "" -- don't just use the system clipboard opt.wrap = false diff --git a/lua/custom/mappings.lua b/lua/custom/mappings.lua index 1865fff..efbbd2b 100644 --- a/lua/custom/mappings.lua +++ b/lua/custom/mappings.lua @@ -629,16 +629,23 @@ M.debug = { local my_sidebar = widgets.sidebar(widgets.frames) my_sidebar.open() end, - "debug window scopes", + "debug window frames", noremap = true, }, ["dK"] = { function() - require('dap.ui.widgets').hover() + require("dap.ui.widgets").hover() end, "debug hover", noremap = true, }, + ["du"] = { + function() + require("dapui").toggle() + end, + "debug ui toggle", + noremap = true, + }, }, } diff --git a/lua/custom/plugins.lua b/lua/custom/plugins.lua index 42ee5f0..5c369df 100644 --- a/lua/custom/plugins.lua +++ b/lua/custom/plugins.lua @@ -735,24 +735,12 @@ local plugins = { end, config = function() local dap = require "dap" - -- dap.adapters.gdb = { - -- type = "executable", - -- command = "gdb", - -- args = { "-i", "dap" }, -- NOTE: gdb sometimes has no built in dap interface, LMDE6 has this i - -- -- think. Don't bother with compiling from source - -- } - dap.adapters.codelldb = { - type = "server", - port = "${port}", - executable = { - -- CHANGE THIS to your path! - command = "/home/plex/.local/share/codelldb/extension/adapter/codelldb", - args = { "--port", "${port}" }, - - -- On windows you may have to uncomment this: - -- detached = false, - }, - } + local rustcfg = require "rustaceanvim.config" + local mason_registry = require "mason-registry" + local codelldb_root = mason_registry.get_package("codelldb"):get_install_path() .. "/extension/" + local codelldb_path = codelldb_root .. "adapter/codelldb" + local liblldb_path = codelldb_root .. "lldb/lib/liblldb.so" + dap.adapters.codelldb = rustcfg.get_codelldb_adapter(codelldb_path, liblldb_path) dap.configurations.cpp = { { name = "Launch file", @@ -771,8 +759,10 @@ local plugins = { }, { "rcarriga/nvim-dap-ui", - enabled = false, - lazy = false, + enabled = true, + init = function() + require("core.utils").load_mappings "debug" + end, dependencies = { "mfussenegger/nvim-dap", },