From 3f2f33c19c0df3f1896b01c0950c5e8bfc86547a Mon Sep 17 00:00:00 2001 From: Bad Date: Tue, 19 Oct 2021 22:14:27 +0200 Subject: [PATCH] Add neovim-dap and configure it for go Should probably put it in a separate file, TODO --- users/profiles/neovim/default.nix | 85 +++++++++++++++++++++++++++++++ 1 file changed, 85 insertions(+) diff --git a/users/profiles/neovim/default.nix b/users/profiles/neovim/default.nix index 6a04fab..31dba27 100644 --- a/users/profiles/neovim/default.nix +++ b/users/profiles/neovim/default.nix @@ -31,6 +31,91 @@ plugin = iceberg-vim; config = "colorscheme iceberg"; } + { + plugin = nvim-dap; + config = '' + lua < :lua require'dap'.continue() + nnoremap :lua require'dap'.step_over() + nnoremap :lua require'dap'.step_into() + nnoremap :lua require'dap'.step_out() + nnoremap b :lua require'dap'.toggle_breakpoint() + nnoremap B :lua require'dap'.set_breakpoint(vim.fn.input('Breakpoint condition: ')) + nnoremap lp :lua require'dap'.set_breakpoint(nil, nil, vim.fn.input('Log point message: ')) + nnoremap dr :lua require'dap'.repl.open() + nnoremap dl :lua require'dap'.run_last() + ''; + } + { + plugin = nvim-dap-ui; + config = "lua require('dapui').setup()"; + } + vim-sleuth vim-nix pkgs.go-fold-if-err-nil