From f42fbfa4a10590fe52145a043655934dcd06c63e Mon Sep 17 00:00:00 2001 From: Daniel Lundin Date: Tue, 15 Feb 2022 17:50:54 +0100 Subject: [PATCH] nvim: dap config --- .config/nvim/lua/dln/telescope.lua | 1 + .config/nvim/lua/plugins.lua | 14 +++++++++++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/.config/nvim/lua/dln/telescope.lua b/.config/nvim/lua/dln/telescope.lua index 4e0a6ad..c25f691 100644 --- a/.config/nvim/lua/dln/telescope.lua +++ b/.config/nvim/lua/dln/telescope.lua @@ -43,6 +43,7 @@ layout_strategies.flex = function(self, max_columns, max_lines) end -- Extensions +telescope.load_extension("dap") telescope.load_extension("fzy_native") telescope.load_extension("gh") -- telescope.load_extension("packer") -- currently breaking packer diff --git a/.config/nvim/lua/plugins.lua b/.config/nvim/lua/plugins.lua index 7c16ddd..9986adb 100644 --- a/.config/nvim/lua/plugins.lua +++ b/.config/nvim/lua/plugins.lua @@ -9,7 +9,7 @@ return require('packer').startup(function() use 'mfussenegger/nvim-dap' use {'ray-x/guihua.lua', run = 'cd lua/fzy && make'} - use { "rcarriga/nvim-dap-ui", requires = {"mfussenegger/nvim-dap"} } + -- use { "rcarriga/nvim-dap-ui", requires = {"mfussenegger/nvim-dap"} } use { 'theHamsta/nvim-dap-virtual-text', @@ -210,7 +210,8 @@ return require('packer').startup(function() 'nvim-lua/popup.nvim', 'nvim-lua/plenary.nvim', 'nvim-telescope/telescope-fzy-native.nvim', - 'nvim-telescope/telescope-github.nvim' + 'nvim-telescope/telescope-github.nvim', + 'nvim-telescope/telescope-dap.nvim' }, config = function() require('dln.telescope') @@ -231,6 +232,11 @@ return require('packer').startup(function() map('n', 'g/', 'lua require("telescope.builtin").lsp_document_symbols()') map('n', 'g?', 'lua require("telescope.builtin").lsp_workspace_symbols()') map('n', 'ge', 'lua require("telescope.builtin").lsp_document_diagnostics()') + map('n', 'Db', 'lua require("telescope").extensions.dap.list_breakpoints()') + map('n', 'Dc', 'lua require("telescope").extensions.dap.commands()') + map('n', 'Df', 'lua require("telescope").extensions.dap.frames()') + map('n', 'DD', ':GoBreakToggle') + map('n', 'Dv', 'lua require("telescope").extensions.dap.variables()') end } @@ -265,7 +271,9 @@ return require('packer').startup(function() "ray-x/go.nvim", config = function() require('go').setup({ - comment_placeholder = '' + comment_placeholder = '', + icons = {breakpoint = '🧘', currentpos = '🏃'}, + dap_debug_gui = true }) vim.cmd("autocmd FileType go nmap c :lua require('go.comment').gen()") vim.cmd("autocmd BufWritePre *.go :silent! lua require('go.format').gofmt()")