nvim: changes to dap
This commit is contained in:
parent
883cadce78
commit
e39eba7ceb
2 changed files with 13 additions and 13 deletions
|
@ -2,6 +2,7 @@ local M = {}
|
||||||
|
|
||||||
-- DAP: Debug Adapter Protocol >>>
|
-- DAP: Debug Adapter Protocol >>>
|
||||||
M.nvim_dap = function()
|
M.nvim_dap = function()
|
||||||
|
local dap = require('dap')
|
||||||
-- keybinds
|
-- keybinds
|
||||||
vim.cmd [[
|
vim.cmd [[
|
||||||
" Debugger movement
|
" Debugger movement
|
||||||
|
@ -17,14 +18,13 @@ M.nvim_dap = function()
|
||||||
nnoremap <silent> <leader>dp <cmd>lua require'dap'.run_last()<CR>
|
nnoremap <silent> <leader>dp <cmd>lua require'dap'.run_last()<CR>
|
||||||
nnoremap <silent> <leader>dr <cmd>lua require'dap'.repl.open()<CR>
|
nnoremap <silent> <leader>dr <cmd>lua require'dap'.repl.open()<CR>
|
||||||
]]
|
]]
|
||||||
require('dap')
|
require("dap")
|
||||||
vim.fn.sign_define('DapBreakpoint', {text = '綠', texthl = 'ErrorMsg', linehl = '', numhl = ''}) -- custom attributes of breakpointed lines (use an emoji?)
|
vim.fn.sign_define('DapBreakpoint', {text = '綠', texthl = 'ErrorMsg', linehl = '', numhl = ''}) -- custom attributes of breakpointed lines (use an emoji?)
|
||||||
vim.fn.sign_define('DapBreakpointRejected', {text = '祿', texthl = 'ErrorMsg', linehl = '', numhl = ''})
|
vim.fn.sign_define('DapBreakpointRejected', {text = '祿', texthl = 'ErrorMsg', linehl = '', numhl = ''})
|
||||||
vim.fn.sign_define('DapLogPoint', {text = ' ', texthl = 'ErrorMsg', linehl = '', numhl = ''})
|
vim.fn.sign_define('DapLogPoint', {text = ' ', texthl = 'ErrorMsg', linehl = '', numhl = ''})
|
||||||
vim.fn.sign_define('DapStopped', {text = '→ ', texthl = 'String', linehl = '', numhl = ''})
|
vim.fn.sign_define('DapStopped', {text = '→ ', texthl = 'String', linehl = '', numhl = ''})
|
||||||
vim.cmd "au FileType dap-repl lua require('dap.ext.autocompl').attach()"
|
vim.cmd "au FileType dap-repl lua require('dap.ext.autocompl').attach()"
|
||||||
-- dap configuration
|
-- dap configuration
|
||||||
local dap = require('dap')
|
|
||||||
dap.defaults.fallback.terminal_win_cmd = "10new"
|
dap.defaults.fallback.terminal_win_cmd = "10new"
|
||||||
-- per-language config:
|
-- per-language config:
|
||||||
-- c++ dap congiguration >>>
|
-- c++ dap congiguration >>>
|
||||||
|
@ -75,19 +75,19 @@ M.dap_ui = function()
|
||||||
-- You can change the order of elements in the sidebar
|
-- You can change the order of elements in the sidebar
|
||||||
elements = {
|
elements = {
|
||||||
-- size can be float or integer > 1
|
-- size can be float or integer > 1
|
||||||
{ id = "scopes", size = 0.55, },
|
{ id = "scopes", size = 1, },
|
||||||
{ id = "breakpoints", size = 0.15 },
|
-- { id = "breakpoints", size = 0.15 },
|
||||||
{ id = "stacks", size = 0.15 },
|
-- { id = "stacks", size = 0.15 },
|
||||||
{ id = "watches", size = 0.15 },
|
-- { id = "watches", size = 0.15 },
|
||||||
},
|
},
|
||||||
size = 40,
|
size = 40,
|
||||||
position = "left", -- Can be "left", "right", "top", "bottom"
|
position = "left", -- Can be "left", "right", "top", "bottom"
|
||||||
},
|
},
|
||||||
-- tray = {
|
tray = {
|
||||||
-- elements = { "repl" },
|
elements = { "" },
|
||||||
-- size = 10,
|
size = 10,
|
||||||
-- position = "bottom", -- Can be "left", "right", "top", "bottom"
|
position = "bottom", -- Can be "left", "right", "top", "bottom"
|
||||||
-- },
|
},
|
||||||
floating = {
|
floating = {
|
||||||
max_height = nil, -- These can be integers or a float between 0 and 1.
|
max_height = nil, -- These can be integers or a float between 0 and 1.
|
||||||
max_width = nil, -- Floats will be treated as percentage of your screen.
|
max_width = nil, -- Floats will be treated as percentage of your screen.
|
||||||
|
|
|
@ -95,7 +95,7 @@ M.toggleterm = function()
|
||||||
start_in_insert = true,
|
start_in_insert = true,
|
||||||
insert_mappings = true, -- whether or not the open mapping applies in insert mode
|
insert_mappings = true, -- whether or not the open mapping applies in insert mode
|
||||||
persist_size = true,
|
persist_size = true,
|
||||||
direction = 'float', -- vertical, horizontal, window, or float
|
direction = 'vertical', -- vertical, horizontal, window, or float
|
||||||
close_on_exit = true, -- close the terminal window when the process exits
|
close_on_exit = true, -- close the terminal window when the process exits
|
||||||
-- shell = vim.o.shell, -- change the default shell
|
-- shell = vim.o.shell, -- change the default shell
|
||||||
-- This field is only relevant if direction is set to 'float'
|
-- This field is only relevant if direction is set to 'float'
|
||||||
|
|
Loading…
Add table
Reference in a new issue