Floating windows and laststatus option

Hi!

When I have set laststatus=2 and open a foating window like the one for diagnostics and enter in it, I still see the statusline corresponding to the main window. However, with set laststatus=3, the statusline gets replaced with stuff related to floating window (usually junk).

My question is therefore: is there a way to no disturb statusline when in floating windows with laststatus=3?

Thank you :slight_smile:

The trick is to create an autocmd on filetype or WinEnter and check if window is floating and do a setlocal statusline= using alternate file (#). e.g.

vim.api.nvim_create_autocmd("FileType", {
				pattern = "TelescopePrompt",
				command = [[setlocal statusline=%=%{%expand('#:~')%}]],
			})