From 9b9333086db7e803bf7c8c2ef676ff4da32808ba Mon Sep 17 00:00:00 2001 From: Jacob McDonnell Date: Fri, 18 Oct 2024 13:43:57 -0400 Subject: Integrated LLDB into nvim --- .config/nvim/lazy-lock.json | 16 +++++++++------- .config/nvim/lua/jacob/plugins.lua | 4 +++- .config/nvim/lua/jacob/remaps.lua | 24 ++++++++++++++++++++++++ 3 files changed, 36 insertions(+), 8 deletions(-) diff --git a/.config/nvim/lazy-lock.json b/.config/nvim/lazy-lock.json index 3a80dcc..75b388d 100644 --- a/.config/nvim/lazy-lock.json +++ b/.config/nvim/lazy-lock.json @@ -2,13 +2,15 @@ "LuaSnip": { "branch": "master", "commit": "e808bee352d1a6fcf902ca1a71cee76e60e24071" }, "cmp-nvim-lsp": { "branch": "main", "commit": "39e2eda76828d88b773cc27a3f61d2ad782c922d" }, "harpoon": { "branch": "harpoon2", "commit": "0378a6c428a0bed6a2781d459d7943843f374bce" }, - "lazy.nvim": { "branch": "main", "commit": "48b52b5cfcf8f88ed0aff8fde573a5cc20b1306d" }, + "lazy.nvim": { "branch": "main", "commit": "1159bdccd8910a0fd0914b24d6c3d186689023d9" }, "lsp-zero.nvim": { "branch": "v3.x", "commit": "56db3d5ce5476b183783160e6045f7337ba12b83" }, + "mason.nvim": { "branch": "main", "commit": "e2f7f9044ec30067bc11800a9e266664b88cda22" }, "nvim-cmp": { "branch": "main", "commit": "ae644feb7b67bf1ce4260c231d1d4300b19c6f30" }, - "nvim-lspconfig": { "branch": "master", "commit": "bb682c167a0878338b4313b55538953d1c039085" }, - "nvim-treesitter": { "branch": "master", "commit": "e0338f2b74fbad808f2569c7d4eadd8796af2118" }, - "plenary.nvim": { "branch": "master", "commit": "ec289423a1693aeae6cd0d503bac2856af74edaa" }, + "nvim-dap": { "branch": "master", "commit": "7ff6936010b7222fea2caea0f67ed77f1b7c60dd" }, + "nvim-lspconfig": { "branch": "master", "commit": "b55b9659de9ac17e05df4787bb023e4c7ef45329" }, + "nvim-treesitter": { "branch": "master", "commit": "68b2bdd99d889e9705f7e90ae64d990f3ff03cf3" }, + "plenary.nvim": { "branch": "master", "commit": "2d9b06177a975543726ce5c73fca176cedbffe9d" }, "telescope.nvim": { "branch": "master", "commit": "6312868392331c9c0f22725041f1ec2bef57c751" }, - "tokyonight.nvim": { "branch": "main", "commit": "4b386e66a9599057587c30538d5e6192e3d1c181" }, - "undotree": { "branch": "master", "commit": "56c684a805fe948936cda0d1b19505b84ad7e065" } -} \ No newline at end of file + "tokyonight.nvim": { "branch": "main", "commit": "2c85fad417170d4572ead7bf9fdd706057bd73d7" }, + "undotree": { "branch": "master", "commit": "78b5241191852ffa9bb5da5ff2ee033160798c3b" } +} diff --git a/.config/nvim/lua/jacob/plugins.lua b/.config/nvim/lua/jacob/plugins.lua index 83675c0..70b52d5 100644 --- a/.config/nvim/lua/jacob/plugins.lua +++ b/.config/nvim/lua/jacob/plugins.lua @@ -41,7 +41,7 @@ require("lazy").setup({ end, }, { - "nvim-treesitter/nvim-treesitter", + "nvim-treesitter/nvim-treesitter", build = ":TSUpdate", }, { @@ -55,4 +55,6 @@ require("lazy").setup({ {'hrsh7th/cmp-nvim-lsp'}, {'hrsh7th/nvim-cmp'}, {'L3MON4D3/LuaSnip'}, + {'williamboman/mason.nvim'}, + {"mfussenegger/nvim-dap" }, }) diff --git a/.config/nvim/lua/jacob/remaps.lua b/.config/nvim/lua/jacob/remaps.lua index 52e9e22..f06585c 100644 --- a/.config/nvim/lua/jacob/remaps.lua +++ b/.config/nvim/lua/jacob/remaps.lua @@ -42,3 +42,27 @@ vim.keymap.set("n", "", function() vim.cmd("so") end) +-- remaps for debugger +vim.keymap.set('n', 'c', function() require('dap').continue() end) +vim.keymap.set('n', 'n', function() require('dap').step_over() end) +vim.keymap.set('n', 'i', function() require('dap').step_into() end) +vim.keymap.set('n', 'o', function() require('dap').step_out() end) +vim.keymap.set('n', 'b', function() require('dap').toggle_breakpoint() end) +vim.keymap.set('n', 'B', function() require('dap').set_breakpoint() end) +vim.keymap.set('n', 'lp', function() require('dap').set_breakpoint(nil, nil, vim.fn.input('Log point message: ')) end) +vim.keymap.set('n', 'dr', function() require('dap').repl.open() end) +vim.keymap.set('n', 'dl', function() require('dap').run_last() end) +vim.keymap.set({'n', 'v'}, 'dh', function() + require('dap.ui.widgets').hover() +end) +vim.keymap.set({'n', 'v'}, 'dp', function() + require('dap.ui.widgets').preview() +end) +vim.keymap.set('n', 'df', function() + local widgets = require('dap.ui.widgets') + widgets.centered_float(widgets.frames) +end) +vim.keymap.set('n', 'ds', function() + local widgets = require('dap.ui.widgets') + widgets.centered_float(widgets.scopes) +end) -- cgit v1.2.3