nvim: eliminated an annoying dap-ui thing

This commit is contained in:
PowerUser64 2021-10-07 22:33:14 -07:00
parent 883cadce78
commit 0179f035cb
2 changed files with 13 additions and 13 deletions

View file

@ -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 = {
@ -75,19 +75,19 @@ M.dap_ui = function()
-- You can change the order of elements in the sidebar
elements = {
-- size can be float or integer > 1
{ id = "scopes", size = 0.55, },
{ 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.

View file

@ -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'