refresh lualine when dap sattus is changed

This commit is contained in:
ant 2025-01-04 19:22:41 +01:00
parent 68bf7f530c
commit 8fcbf0d9bf
2 changed files with 28 additions and 1 deletions

View file

@ -82,6 +82,29 @@ end
dap.set_log_level("TRACE")
-- reload lualine module on event
local events = {
"continue",
"terminate",
"restart",
"disconnect",
"event_terminated",
"disconnect",
"event_exited",
"event_stopped",
"threads",
"event_continued",
}
function refresh_lualine_module()
require('lualine').refresh({
scope = 'all', -- scope of refresh all/tabpage/window
place = { 'statusline' }, -- lualine segment ro refresh.
})
end
for _, event in ipairs(events) do
dap.listeners.after[event]["lualine_refresh"] = refresh_lualine_module
end
-- require("telescope").load_extension("dap")
-- Interface Setup
vim.fn.sign_define('DapBreakpoint', { text='', texthl='red'})