diff --git a/src/bridge/ui_commands.rs b/src/bridge/ui_commands.rs index ec07bba..7dd7241 100644 --- a/src/bridge/ui_commands.rs +++ b/src/bridge/ui_commands.rs @@ -145,7 +145,9 @@ impl ParallelCommand { } ParallelCommand::DisplayAvailableFonts(fonts) => { let mut content: Vec = vec![ - "What follows are the font names available for guifont. To use one of these, type:", + "What follows are the font names available for guifont. You can try any of them with in normal mode.", + "", + "To switch to one of them, use one of them, type:", "", " :set guifont=:h", "", @@ -158,6 +160,7 @@ impl ParallelCommand { "", " :set guifont=Cascadia\\ Code\\ PL,Delugia\\ Nerd\\ Font:h12", "", + "Make sure to add the above command when you're happy with it to your .vimrc file or similar config to make it permanent.", "------------------------------", "Available Fonts on this System", "------------------------------", @@ -177,6 +180,11 @@ impl ParallelCommand { ) .await .ok(); + nvim.command( + "nnoremap lua vim.opt.guifont=vim.fn.getline('.')", + ) + .await + .ok(); } #[cfg(windows)] ParallelCommand::RegisterRightClick => {