refresh lualine when dap sattus is changed
This commit is contained in:
parent
68bf7f530c
commit
8fcbf0d9bf
2 changed files with 28 additions and 1 deletions
|
|
@ -82,6 +82,29 @@ end
|
||||||
|
|
||||||
dap.set_log_level("TRACE")
|
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")
|
-- require("telescope").load_extension("dap")
|
||||||
-- Interface Setup
|
-- Interface Setup
|
||||||
vim.fn.sign_define('DapBreakpoint', { text='', texthl='red'})
|
vim.fn.sign_define('DapBreakpoint', { text='', texthl='red'})
|
||||||
|
|
|
||||||
|
|
@ -465,7 +465,11 @@ local plugins = {
|
||||||
"rcarriga/nvim-dap-ui",
|
"rcarriga/nvim-dap-ui",
|
||||||
dependencies = { "mfussenegger/nvim-dap", "nvim-neotest/nvim-nio" },
|
dependencies = { "mfussenegger/nvim-dap", "nvim-neotest/nvim-nio" },
|
||||||
config = function()
|
config = function()
|
||||||
require("dapui").setup()
|
require("dapui").setup({
|
||||||
|
-- controls = {
|
||||||
|
-- enabled = false,
|
||||||
|
-- },
|
||||||
|
})
|
||||||
end
|
end
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue