dapmode and statusline improvements

master
BlobRunner 8 months ago
parent f432a60473
commit c4b2531c79

@ -649,6 +649,7 @@ M.dap = { -- {{{
["<leader>dm"] = { ["<leader>dm"] = {
function() function()
require('spike.dap.dapmode').start() require('spike.dap.dapmode').start()
vim.cmd.redrawstatus()
end, end,
"enter dap mode" "enter dap mode"
}, },

@ -19,8 +19,13 @@ if g.vim_version < 8 then
end end
opt.laststatus = 3 -- global statusline opt.laststatus = 3 -- global statusline
-- for statusline format see lua/custom/plugins/nvchadui.lua -- for statusline format see lua/custom/plugins/nvchadui.lua
opt.cmdheight = 1 if vim.env.STREAMING ~= nil then
opt.cmdheight = 0
else
opt.cmdheight = 1
end
opt.showmode = false opt.showmode = false
opt.title = true opt.title = true

@ -47,6 +47,7 @@ M.plugins = {
-- lazyload = false, -- lazyload = false,
-- }, -- },
statusline = { statusline = {
separator_style = 'block',
overriden_modules = function() overriden_modules = function()
return require "custom.plugins.nvchadui" return require "custom.plugins.nvchadui"
end end

@ -53,11 +53,11 @@ return {
local mode_sep1 = "%#" .. modes[m][2] .. "Sep" .. "#" .. sep_r local mode_sep1 = "%#" .. modes[m][2] .. "Sep" .. "#" .. sep_r
if is_dapmode() then if is_dapmode() then
local dap_mode = "%#St_DapMode#DAP" .. "%#St_DapModeSep#" local dap_mode = "%#St_DapMode# DAP" .. "%#St_DapModeSep#"
return current_mode .. mode_sep1 .. "%#St_DapModeSep2#" .. sep_r .. dap_mode .. sep_r return current_mode .. mode_sep1 .. dap_mode .. sep_r
end end
return current_mode .. mode_sep1 .. "%#ST_EmptySpace#" .. sep_r return current_mode .. mode_sep1
end, end,
fileInfo = function() fileInfo = function()

@ -93,6 +93,7 @@ local config = {
['Q'] = { ['Q'] = {
rhs = function() rhs = function()
M.layer:exit() M.layer:exit()
vim.cmd.redrawstatus()
end, end,
desc = '[dap] exit dap mode' desc = '[dap] exit dap mode'
}, },
@ -136,7 +137,9 @@ function M.start()
end end
function M.stop() function M.stop()
if M.layer ~= nil then M.layer:exit() end if M.layer ~= nil then
M.layer:exit()
end
end end
function M.setup (opts) function M.setup (opts)

Loading…
Cancel
Save