Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Client/Server mode: Mapping for font resizing #856

Closed
phi-mah opened this issue Aug 4, 2021 · 2 comments
Closed

Client/Server mode: Mapping for font resizing #856

phi-mah opened this issue Aug 4, 2021 · 2 comments
Labels
bug Something isn't working

Comments

@phi-mah
Copy link

phi-mah commented Aug 4, 2021

Hi,
and sorry for the zillionth font question...

I make heavy use of the --remote-tcp option, connecting to a headless nvim session on a remote sever.

To quickly change the visible font size, i have a function as follows, which is eventually mapped to <C-+>/<C--> .

let s:guifontsize = 10
let s:guifont = "JetBrainsMono\\ Nerd\\ Font"

function! AdjustFontSize(amount)
  let s:guifontsize = s:guifontsize+a:amount
  exe "set guifont=" .. s:guifont .. ":h" .. s:guifontsize
endfunction

This approach works in a native neovide session, but not when connecting to a remote nvim instance. Still, I can change the font size via the direct colon statement, e.g.::set guifont="JetBrainsMono\\ Nerd\\ Font:h16", but this is a bit cumbersome for a statement that I use quite frequently.

Coming from neovim-qt, a similar function as given above did work. There the neovim-gui-shim plugin sends a rpc to all connected clients. I assume that neovide handles this differently which prevents the function statements from reaching the GUI.

In short: It would be nice to have a shortcut that changes the font size and works even with a TCP connection in between.

@zoomlogo zoomlogo added the bug Something isn't working label Aug 4, 2021
@Kethku
Copy link
Member

Kethku commented Aug 8, 2021

This is almost certainly an upstream bug. I see no reason why the given function should operate differently local vs remote.

@Kethku
Copy link
Member

Kethku commented Jan 20, 2022

@phi-mah does this issue still happen? Its possible this was a threading issue, but I'd like to follow up. Please reopen if so

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants