debug works much better now

This commit is contained in:
TJ DeVries 2023-02-15 21:01:33 -05:00
parent 1a2a96be4c
commit 0d7e4dadab
5 changed files with 112 additions and 70 deletions

24
doc/kickstart.txt Normal file
View file

@ -0,0 +1,24 @@
================================================================================
INTRODUCTION *kickstart.nvim*
Kickstart.nvim is a project to help you get started on your neovim journey.
*kickstart-is-not*
It is not:
- Complete framework for every plugin under the sun
- Place to add every plugin that could ever be useful
*kickstart-is*
It is:
- Somewhere that has a good start for the most common "IDE" type features:
- autocompletion
- goto-definition
- find references
- fuzzy finding
- and hinting at what more can be done :)
- A place to _kickstart_ your journey.
- You should fork this project and use/modify it so that it matches your
style and preferences. If you don't want to do that, there are probably
other projects that would fit much better for you (and that's great!)!
vim:tw=78:ts=8:ft=help:norl:

3
doc/tags Normal file
View file

@ -0,0 +1,3 @@
kickstart-is kickstart.txt /*kickstart-is*
kickstart-is-not kickstart.txt /*kickstart-is-not*
kickstart.nvim kickstart.txt /*kickstart.nvim*

View file

@ -77,13 +77,14 @@ require('lazy').setup({
end, end,
}, },
-- Next Step: Add additional "plugins" for kickstart -- Next Step on Your Neovim Journey: Add/Configure additional "plugins" for kickstart
require 'kickstart.plugins.autoformat', -- require 'kickstart.plugins.autoformat',
-- require('kickstart.plugins.debug'), -- require 'kickstart.plugins.debug',
-- TODO: -- Add your own custom plugins to `lua/custom/plugins/*.lua`
-- { import = 'kickstart.plugins' }, -- For more information see:
-- { import = 'custom.plugins' }, -- https://github.com/folke/lazy.nvim#-structuring-your-plugins
{ import = 'custom.plugins' },
}, {}) }, {})
-- [[ Setting options ]] -- [[ Setting options ]]

View file

@ -0,0 +1,3 @@
-- You can add your own plugins here or in other files in this directory!
-- I promise not to create any merge conflicts in this directory :)
return {}

View file

@ -1,6 +1,17 @@
return { return {
{ 'mfussenegger/nvim-dap',
enabled = true, dependencies = {
-- Creates a beautiful debugger UI
'rcarriga/nvim-dap-ui',
-- Installs the debug adapters for you
'williamboman/mason.nvim',
'jay-babu/mason-nvim-dap.nvim',
-- Add your own debuggers here
'leoluz/nvim-dap-go',
},
config = function() config = function()
-- Optional debug adapter setup -- Optional debug adapter setup
-- --
@ -8,6 +19,7 @@ return {
-- of the init.lua. You'll also want to copy this file into your -- of the init.lua. You'll also want to copy this file into your
-- config at ~/.config/nvim/after/plugin/dap.lua -- config at ~/.config/nvim/after/plugin/dap.lua
local dap = require 'dap'
local dapui = require 'dapui' local dapui = require 'dapui'
require('mason-nvim-dap').setup { require('mason-nvim-dap').setup {
@ -28,13 +40,13 @@ return {
require('mason-nvim-dap').setup_handlers() require('mason-nvim-dap').setup_handlers()
-- Basic debugging keymaps, feel free to change to your liking! -- Basic debugging keymaps, feel free to change to your liking!
vim.keymap.set('n', '<F5>', require('dap').continue) vim.keymap.set('n', '<F5>', dap.continue)
vim.keymap.set('n', '<F1>', require('dap').step_into) vim.keymap.set('n', '<F1>', dap.step_into)
vim.keymap.set('n', '<F2>', require('dap').step_over) vim.keymap.set('n', '<F2>', dap.step_over)
vim.keymap.set('n', '<F3>', require('dap').step_out) vim.keymap.set('n', '<F3>', dap.step_out)
vim.keymap.set('n', '<leader>b', require('dap').toggle_breakpoint) vim.keymap.set('n', '<leader>b', dap.toggle_breakpoint)
vim.keymap.set('n', '<leader>B', function() vim.keymap.set('n', '<leader>B', function()
require('dap').set_breakpoint(vim.fn.input 'Breakpoint condition: ') dap.set_breakpoint(vim.fn.input 'Breakpoint condition: ')
end) end)
-- Dap UI setup -- Dap UI setup
@ -65,5 +77,4 @@ return {
-- Install golang specific config -- Install golang specific config
require('dap-go').setup() require('dap-go').setup()
end, end,
},
} }