Open sytranvn opened 2 months ago
I got some cod working, that gets them back, but only as text, and not as actuall buttons:
local function get_current_winbar()
local winbar = vim.api.nvim_eval_statusline(vim.opt.winbar:get(), { use_winbar = true }).str
winbar = winbar:gsub("^%s+", "")
winbar = winbar:gsub("+$", "") -- My Lualine Separator
winbar = winbar:gsub("%s+$", "")
return winbar
end
local dapui = {}
dapui.sections = {
lualine_a = {},
}
dapui.filetypes = {
"dap-repl",
"dapui_console",
"dapui_console",
"dapui_watches",
"dapui_stacks",
"dapui_breakpoints",
"dapui_scopes",
}
dapui.winbar = {
lualine_a = {
{
function()
local filetype = vim.bo.filetype
local disabled_filetypes = { "dap-repl" }
if vim.tbl_contains(disabled_filetypes, filetype) then
return get_current_winbar()
else
return vim.fn.expand("%:t")
end
end,
},
},
}
Well, you could allways completely disable lualine fo the repl, by just putting "dap-repl"
,
in the options.disabled_filetypes
but that would not only disable it for the winbar, but also for the line
I got it working, PR for extension will come soon:
@snoweuph Thank you, I'm currently using your code as custom extension and it works great! Hope the PR will be merged soon.
Well, you could allways completely disable lualine fo the repl, by just putting
"dap-repl"
, in theoptions.disabled_filetypes
but that would not only disable it for the winbar, but also for the line
disabled_filetypes
has a winbar
field so that you can just disable the winbar and not the statusline. This is what I am using in my current config.
Well, you could allways completely disable lualine fo the repl, by just putting
"dap-repl"
, in theoptions.disabled_filetypes
but that would not only disable it for the winbar, but also for the line
disabled_filetypes
has awinbar
field so that you can just disable the winbar and not the statusline. This is what I am using in my current config.
but then you lose the unified styling, with the custom extension, for which I opend up a PR, it will be unified
I have this lualine config to display file path
When I debug, the DAP UI buttons are overridden. When I switch window, I can see it flashes then disappears.
https://github.com/nvim-lualine/lualine.nvim/assets/13009812/8d150c82-7392-4c48-9137-7dffec8f1ae8