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,
},
-- Next Step: Add additional "plugins" for kickstart
require 'kickstart.plugins.autoformat',
-- require('kickstart.plugins.debug'),
-- Next Step on Your Neovim Journey: Add/Configure additional "plugins" for kickstart
-- require 'kickstart.plugins.autoformat',
-- require 'kickstart.plugins.debug',
-- TODO:
-- { import = 'kickstart.plugins' },
-- { import = 'custom.plugins' },
-- Add your own custom plugins to `lua/custom/plugins/*.lua`
-- For more information see:
-- https://github.com/folke/lazy.nvim#-structuring-your-plugins
{ import = 'custom.plugins' },
}, {})
-- [[ 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,69 +1,80 @@
return {
{
enabled = true,
config = function()
-- Optional debug adapter setup
--
-- To enable setup, change `disable = true` in the packer section
-- of the init.lua. You'll also want to copy this file into your
-- config at ~/.config/nvim/after/plugin/dap.lua
'mfussenegger/nvim-dap',
dependencies = {
-- Creates a beautiful debugger UI
'rcarriga/nvim-dap-ui',
local dapui = require 'dapui'
-- Installs the debug adapters for you
'williamboman/mason.nvim',
'jay-babu/mason-nvim-dap.nvim',
require('mason-nvim-dap').setup {
-- Makes a best effort to setup the various debuggers with
-- reasonable debug configurations
automatic_setup = true,
-- You'll need to check that you have the required things installed
-- online, please don't ask me how to install them :)
ensure_installed = {
-- Update this to ensure that you have the debuggers for the langs you want
'delve',
},
}
-- You can provide additional configuration to the handlers,
-- see mason-nvim-dap README for more information
require('mason-nvim-dap').setup_handlers()
-- Basic debugging keymaps, feel free to change to your liking!
vim.keymap.set('n', '<F5>', require('dap').continue)
vim.keymap.set('n', '<F1>', require('dap').step_into)
vim.keymap.set('n', '<F2>', require('dap').step_over)
vim.keymap.set('n', '<F3>', require('dap').step_out)
vim.keymap.set('n', '<leader>b', require('dap').toggle_breakpoint)
vim.keymap.set('n', '<leader>B', function()
require('dap').set_breakpoint(vim.fn.input 'Breakpoint condition: ')
end)
-- Dap UI setup
-- For more information, see |:help nvim-dap-ui|
dapui.setup {
-- Set icons to characters that are more likely to work in every terminal.
-- Feel free to remove or use ones that you like more! :)
-- Don't feel like these are good choices.
icons = { expanded = '', collapsed = '', current_frame = '*' },
controls = {
icons = {
pause = '',
play = '',
step_into = '',
step_over = '',
step_out = '',
step_back = 'b',
run_last = '▶▶',
terminate = '',
},
},
}
dap.listeners.after.event_initialized['dapui_config'] = dapui.open
dap.listeners.before.event_terminated['dapui_config'] = dapui.close
dap.listeners.before.event_exited['dapui_config'] = dapui.close
-- Install golang specific config
require('dap-go').setup()
end,
-- Add your own debuggers here
'leoluz/nvim-dap-go',
},
config = function()
-- Optional debug adapter setup
--
-- To enable setup, change `disable = true` in the packer section
-- of the init.lua. You'll also want to copy this file into your
-- config at ~/.config/nvim/after/plugin/dap.lua
local dap = require 'dap'
local dapui = require 'dapui'
require('mason-nvim-dap').setup {
-- Makes a best effort to setup the various debuggers with
-- reasonable debug configurations
automatic_setup = true,
-- You'll need to check that you have the required things installed
-- online, please don't ask me how to install them :)
ensure_installed = {
-- Update this to ensure that you have the debuggers for the langs you want
'delve',
},
}
-- You can provide additional configuration to the handlers,
-- see mason-nvim-dap README for more information
require('mason-nvim-dap').setup_handlers()
-- Basic debugging keymaps, feel free to change to your liking!
vim.keymap.set('n', '<F5>', dap.continue)
vim.keymap.set('n', '<F1>', dap.step_into)
vim.keymap.set('n', '<F2>', dap.step_over)
vim.keymap.set('n', '<F3>', dap.step_out)
vim.keymap.set('n', '<leader>b', dap.toggle_breakpoint)
vim.keymap.set('n', '<leader>B', function()
dap.set_breakpoint(vim.fn.input 'Breakpoint condition: ')
end)
-- Dap UI setup
-- For more information, see |:help nvim-dap-ui|
dapui.setup {
-- Set icons to characters that are more likely to work in every terminal.
-- Feel free to remove or use ones that you like more! :)
-- Don't feel like these are good choices.
icons = { expanded = '', collapsed = '', current_frame = '*' },
controls = {
icons = {
pause = '',
play = '',
step_into = '',
step_over = '',
step_out = '',
step_back = 'b',
run_last = '▶▶',
terminate = '',
},
},
}
dap.listeners.after.event_initialized['dapui_config'] = dapui.open
dap.listeners.before.event_terminated['dapui_config'] = dapui.close
dap.listeners.before.event_exited['dapui_config'] = dapui.close
-- Install golang specific config
require('dap-go').setup()
end,
}