debug works much better now
This commit is contained in:
parent
1a2a96be4c
commit
0d7e4dadab
24
doc/kickstart.txt
Normal file
24
doc/kickstart.txt
Normal 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
3
doc/tags
Normal 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*
|
13
init.lua
13
init.lua
@ -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 ]]
|
||||||
|
3
lua/custom/plugins/init.lua
Normal file
3
lua/custom/plugins/init.lua
Normal 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 {}
|
@ -1,69 +1,80 @@
|
|||||||
return {
|
return {
|
||||||
{
|
'mfussenegger/nvim-dap',
|
||||||
enabled = true,
|
dependencies = {
|
||||||
config = function()
|
-- Creates a beautiful debugger UI
|
||||||
-- Optional debug adapter setup
|
'rcarriga/nvim-dap-ui',
|
||||||
--
|
|
||||||
-- 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 dapui = require 'dapui'
|
-- Installs the debug adapters for you
|
||||||
|
'williamboman/mason.nvim',
|
||||||
|
'jay-babu/mason-nvim-dap.nvim',
|
||||||
|
|
||||||
require('mason-nvim-dap').setup {
|
-- Add your own debuggers here
|
||||||
-- Makes a best effort to setup the various debuggers with
|
'leoluz/nvim-dap-go',
|
||||||
-- 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,
|
|
||||||
},
|
},
|
||||||
|
|
||||||
|
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,
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user