added plugins
This commit is contained in:
parent
2ba39c6973
commit
83cf11d0ad
13 changed files with 338 additions and 0 deletions
142
lua/custom/plugins/nvim-dap.lua
Normal file
142
lua/custom/plugins/nvim-dap.lua
Normal file
|
|
@ -0,0 +1,142 @@
|
|||
return {
|
||||
{
|
||||
'mfussenegger/nvim-dap',
|
||||
dependencies = {
|
||||
'nvim-neotest/nvim-nio',
|
||||
},
|
||||
keys = {
|
||||
{
|
||||
'<leader>db',
|
||||
function()
|
||||
require('dap').toggle_breakpoint()
|
||||
end,
|
||||
desc = 'Toggle [d]ap [b]reakpoint',
|
||||
},
|
||||
{
|
||||
'<F5>',
|
||||
function()
|
||||
require('dap').continue()
|
||||
end,
|
||||
desc = 'dap continue',
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
'mfussenegger/nvim-dap-python',
|
||||
ft = 'python',
|
||||
dependencies = {
|
||||
'mfussenegger/nvim-dap',
|
||||
'rcarriga/nvim-dap-ui',
|
||||
},
|
||||
config = function()
|
||||
local path = '~/.local/share/nvim/mason/packages/debugpy/venv/bin/python'
|
||||
require('dap-python').setup(path)
|
||||
end,
|
||||
},
|
||||
{
|
||||
'leoluz/nvim-dap-go',
|
||||
ft = 'go',
|
||||
dependencies = {
|
||||
'mfussenegger/nvim-dap',
|
||||
'rcarriga/nvim-dap-ui',
|
||||
},
|
||||
config = function()
|
||||
require('dap-go').setup(opts)
|
||||
end,
|
||||
},
|
||||
|
||||
{
|
||||
'rcarriga/nvim-dap-ui',
|
||||
keys = {
|
||||
{
|
||||
'<leader>du',
|
||||
function()
|
||||
require('dapui').toggle()
|
||||
end,
|
||||
desc = 'Toggle [d]ap [u]i',
|
||||
silent = true,
|
||||
},
|
||||
},
|
||||
opts = {
|
||||
controls = {
|
||||
element = 'repl',
|
||||
enabled = true,
|
||||
icons = {
|
||||
disconnect = '',
|
||||
pause = '',
|
||||
play = '',
|
||||
run_last = '',
|
||||
step_back = '',
|
||||
step_into = '',
|
||||
step_out = '',
|
||||
step_over = '',
|
||||
terminate = '',
|
||||
},
|
||||
},
|
||||
element_mappings = {},
|
||||
expand_lines = true,
|
||||
floating = {
|
||||
border = 'single',
|
||||
mappings = {
|
||||
close = { 'q', '<Esc>' },
|
||||
},
|
||||
},
|
||||
force_buffers = true,
|
||||
icons = {
|
||||
collapsed = '',
|
||||
current_frame = '',
|
||||
expanded = '',
|
||||
},
|
||||
layouts = {
|
||||
{
|
||||
elements = {
|
||||
{
|
||||
id = 'scopes',
|
||||
size = 0.25,
|
||||
},
|
||||
{
|
||||
id = 'breakpoints',
|
||||
size = 0.25,
|
||||
},
|
||||
{
|
||||
id = 'stacks',
|
||||
size = 0.25,
|
||||
},
|
||||
{
|
||||
id = 'watches',
|
||||
size = 0.25,
|
||||
},
|
||||
},
|
||||
position = 'left',
|
||||
size = 40,
|
||||
},
|
||||
{
|
||||
elements = { {
|
||||
id = 'repl',
|
||||
size = 0.5,
|
||||
}, {
|
||||
id = 'console',
|
||||
size = 0.5,
|
||||
} },
|
||||
position = 'bottom',
|
||||
size = 10,
|
||||
},
|
||||
},
|
||||
mappings = {
|
||||
edit = 'e',
|
||||
expand = { '<CR>', '<2-LeftMouse>' },
|
||||
open = 'o',
|
||||
remove = 'd',
|
||||
repl = 'r',
|
||||
toggle = 't',
|
||||
},
|
||||
render = {
|
||||
indent = 1,
|
||||
max_value_lines = 100,
|
||||
},
|
||||
},
|
||||
config = function(_, opts)
|
||||
require('dapui').setup(opts)
|
||||
end,
|
||||
},
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue