nvim: eliminated an annoying dap-ui thing
This commit is contained in:
parent
883cadce78
commit
0179f035cb
2 changed files with 13 additions and 13 deletions
|
@ -2,6 +2,7 @@ local M = {}
|
|||
|
||||
-- DAP: Debug Adapter Protocol >>>
|
||||
M.nvim_dap = function()
|
||||
local dap = require('dap')
|
||||
-- keybinds
|
||||
vim.cmd [[
|
||||
" Debugger movement
|
||||
|
@ -17,14 +18,13 @@ M.nvim_dap = function()
|
|||
nnoremap <silent> <leader>dp <cmd>lua require'dap'.run_last()<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('DapBreakpointRejected', {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.cmd "au FileType dap-repl lua require('dap.ext.autocompl').attach()"
|
||||
-- dap configuration
|
||||
local dap = require('dap')
|
||||
dap.defaults.fallback.terminal_win_cmd = "10new"
|
||||
-- per-language config:
|
||||
-- c++ dap congiguration >>>
|
||||
|
@ -61,7 +61,7 @@ M.dap_ui = function()
|
|||
-- require("dapui").close()
|
||||
-- require("dapui").toggle()
|
||||
-- toggle dap-ui with leader di as in dap interface
|
||||
vim.cmd 'nnoremap <silent> <leader>di <cmd>lua require("dapui").toggle()<CR>'
|
||||
vim.cmd 'nnoremap <silent> <leader>di <cmd>lua require("dapui").toggle("sidebar")<CR>'
|
||||
require("dapui").setup({
|
||||
icons = { expanded = "▾", collapsed = "▸" },
|
||||
mappings = {
|
||||
|
@ -74,20 +74,20 @@ M.dap_ui = function()
|
|||
sidebar = {
|
||||
-- You can change the order of elements in the sidebar
|
||||
elements = {
|
||||
-- size can be float or integer > 1
|
||||
{ id = "scopes", size = 0.55, },
|
||||
-- size can be float or integer > 1
|
||||
{ id = "scopes", size = 0.85, },
|
||||
{ id = "breakpoints", size = 0.15 },
|
||||
{ id = "stacks", size = 0.15 },
|
||||
{ id = "watches", size = 0.15 },
|
||||
-- { id = "stacks", size = 0.15 },
|
||||
-- { id = "watches", size = 0.15 },
|
||||
},
|
||||
size = 40,
|
||||
position = "left", -- Can be "left", "right", "top", "bottom"
|
||||
},
|
||||
-- tray = {
|
||||
-- elements = { "repl" },
|
||||
-- size = 10,
|
||||
-- position = "bottom", -- Can be "left", "right", "top", "bottom"
|
||||
-- },
|
||||
tray = {
|
||||
elements = { "repl" },
|
||||
size = 0,
|
||||
position = "top", -- Can be "left", "right", "top", "bottom"
|
||||
},
|
||||
floating = {
|
||||
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.
|
||||
|
|
|
@ -95,7 +95,7 @@ M.toggleterm = function()
|
|||
start_in_insert = true,
|
||||
insert_mappings = true, -- whether or not the open mapping applies in insert mode
|
||||
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
|
||||
-- shell = vim.o.shell, -- change the default shell
|
||||
-- This field is only relevant if direction is set to 'float'
|
||||
|
|
Loading…
Add table
Reference in a new issue