Skip to content

Conversation

@ross
Copy link

@ross ross commented Oct 18, 2025

It appears newer versions of NeoVim have modified guioptions to be immutable causing an error when it's set. This PR adds a guard to the template to omit that line when the target is nvim

Error messages

Clean fedora linux 42 box.

ross@sailfish:~/.config/nvim $ nvim --version
NVIM v0.11.4
Build type: RelWithDebInfo
LuaJIT 2.1.1748459687
Run "nvim -V1 -v" for more info

At startup in the console or when using the VSCode neovim extension I get the following error:

Console

Error detected while processing /home/ross/.config/nvim/init.vim:
line  215:
E519: Option not supported: guioptions=egmrti
Press ENTER or type command to continue

VSCode

2025-10-18 08:56:32.111 [info] MessagesManager: 'Error detected while processing /home/ross/.config/nvim/init.vim:line  215:\n' +
  'E519: Option not supported: guioptions=egmrti\n'

Offending line

set guioptions=egmrti

Research

There's a couple related issues in neovim's repo, neovim/neovim#32396 seems to be the primary and a comment there, neovim/neovim#32396 (comment), links to a PR neovim/neovim#28400 (comment) which changed guioptions from hidden to immutable meaning that it can be read/seen, but not set.

TL;DR:

Seems guioptions isn't supported by neovim, but is still present. Previously it could be set, but was ignored, now it can not.

Options

  • Guard the line during template generation {{if ne .Editor "nvim"}}set guioptions=egmrti{{end}} (this PR)
  • Guard the line with if !has('nvim') for runtime detection
  • Something else/I've got the problem wrong.

Copy link
Member

@cassiobotaro cassiobotaro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants