Skip to main content

find_focusable_float

Function find_focusable_float 

Source
pub fn find_focusable_float(allowed_filetypes: &[&str]) -> Option<Window>
Expand description

Returns the first focusable floating window whose buffer filetype is in allowed_filetypes, if any.

This prevents notification floats (e.g. fidget) from capturing focus; only interactive floats (e.g. fzf-lua picker, filetype "fzf") qualify.

Uses call_function("nvim_win_get_config", ...) returning a raw nvim_oxi::Dictionary instead of Window::get_config() to avoid full WindowConfig deserialization which fails when Neovim returns non-string border values.