diff --git a/lua/core/mappings.lua b/lua/core/mappings.lua index ce2e568..8b64cce 100644 --- a/lua/core/mappings.lua +++ b/lua/core/mappings.lua @@ -649,6 +649,7 @@ M.dap = { -- {{{ ["dm"] = { function() require('spike.dap.dapmode').start() + vim.cmd.redrawstatus() end, "enter dap mode" }, diff --git a/lua/core/options.lua b/lua/core/options.lua index c98c9d2..0f428a2 100644 --- a/lua/core/options.lua +++ b/lua/core/options.lua @@ -19,8 +19,13 @@ if g.vim_version < 8 then end opt.laststatus = 3 -- global statusline + -- 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.title = true diff --git a/lua/custom/chadrc.lua b/lua/custom/chadrc.lua index 5f7ed58..9f0e5de 100644 --- a/lua/custom/chadrc.lua +++ b/lua/custom/chadrc.lua @@ -47,6 +47,7 @@ M.plugins = { -- lazyload = false, -- }, statusline = { + separator_style = 'block', overriden_modules = function() return require "custom.plugins.nvchadui" end diff --git a/lua/custom/plugins/nvchadui.lua b/lua/custom/plugins/nvchadui.lua index 733cf25..2248de2 100644 --- a/lua/custom/plugins/nvchadui.lua +++ b/lua/custom/plugins/nvchadui.lua @@ -53,11 +53,11 @@ return { local mode_sep1 = "%#" .. modes[m][2] .. "Sep" .. "#" .. sep_r if is_dapmode() then - local dap_mode = "%#St_DapMode#DAP" .. "%#St_DapModeSep#" - return current_mode .. mode_sep1 .. "%#St_DapModeSep2#" .. sep_r .. dap_mode .. sep_r + local dap_mode = "%#St_DapMode# DAP" .. "%#St_DapModeSep#" + return current_mode .. mode_sep1 .. dap_mode .. sep_r end - return current_mode .. mode_sep1 .. "%#ST_EmptySpace#" .. sep_r + return current_mode .. mode_sep1 end, fileInfo = function() diff --git a/lua/spike/dap/dapmode.lua b/lua/spike/dap/dapmode.lua index 1e6c059..acf8155 100644 --- a/lua/spike/dap/dapmode.lua +++ b/lua/spike/dap/dapmode.lua @@ -93,6 +93,7 @@ local config = { ['Q'] = { rhs = function() M.layer:exit() + vim.cmd.redrawstatus() end, desc = '[dap] exit dap mode' }, @@ -136,7 +137,9 @@ function M.start() end function M.stop() - if M.layer ~= nil then M.layer:exit() end + if M.layer ~= nil then + M.layer:exit() + end end function M.setup (opts)