Skip to content

[neovim] choosewin: Vim(call):E519: Option not supported #69

@whisperity

Description

@whisperity

The choosewin plug-in does not work in Neovim. (Unless my memory betrays me, this used to work a few years prior but something broke and now it does not.)

Both Vim and Neovim installed from Homebrew updated to the latest versions, see below.

Reproducible with the following simple config file. Put it to ~/vim/repro.vim (not ~/.vim!).

" Note: Not ~/.vim, but a separate test directory that should start empty!
let vimRootPath = expand("~/vim")
set nocompatible

if empty(glob(vimRootPath . "/autoload/plug.vim"))
  exec printf("silent !curl -sfLo %s/autoload/plug.vim --create-dirs http://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim", vimRootPath)
endif
autocmd VimEnter * if len(filter(values(g:plugs), '!isdirectory(v:val.dir)'))
  \ | PlugInstall --sync | source $MYVIMRC
\ | endif
call plug#begin(vimRootPath . "/bundle")

" Note: Default configuration, just download and use the plug-in.
Plug 't9md/vim-choosewin', { 'on': '<Plug>(choosewin)' }
nmap - <Plug>(choosewin)

call plug#end()

With Vim, everything works:

❯ /opt/homebrew/opt/vim/bin/vim -n -O2 -u ~/vim/repro.vim
Vim choose working properly

Even if someone creates tabs and further splits:

Vim choose working properly

However, in Neovim, you get an error:

choosewin: Vim(call):E519: Option not supported

choosewin: Vim(call):E519: Option not supported error

From the verbose log (it's really verbose) I can only see that the exception happens in the following context:

❯ rm -f nvim.log; /opt/homebrew/opt/neovim/bin/nvim -n -O2 -V16nvim.log -u ~/vim/repro.vim
continuing in 5

line 2:
line 3:   if self.conf['overlay_enable']
line 4:     let self.overlay = choosewin#overlay#get()
line 5:   endif
line 6:
line 7:   if self.conf['tabline_replace']
line 8:     let self.tab_options = s:_.buffer_options_set(bufnr(''), s:vim_tab_options)
calling <SNR>28_buffer_options_set(1, {'&tabline': '%!choosewin#tabline()', ...': '%{choosewin#get_tablabel(v:lnum)}'})

line 1:   let R = {}
line 2:   for [var, val] in items(a:options)
line 3:     let R[var] = getbufvar(a:bufnr, var)
line 4:     call setbufvar(a:bufnr, var, val)
line 5:     unlet var val
line 6:   endfor
line 2:   for [var, val] in items(a:options)
line 3:     let R[var] = getbufvar(a:bufnr, var)
line 4:     call setbufvar(a:bufnr, var, val)
Exception thrown: Vim(call):E519: Option not supported

<SNR>28_buffer_options_set aborted

E519 is not much help either. It points to :set option where Neovim says "some legacy options were removed. see nvim-removed", which jumps to a list of >100 lines of listing each removed option…

If I set g:choosewin_tabline_replace = 0, then the error goes away, the number keys still allow selecting a tab, but the visuals of showing target numbers on the tabs are disabled (unlike with Vim, where numbering of tabs works by default):

❯ /opt/homebrew/opt/neovim/bin/nvim -n -p2 -u ~/vim/repro.vim
Neovim with tabline_replace disabled, showing working choosewin functionality but no numbers on the tabs themselves

I hacked a bit to dump exactly what is being set by buffer_options_set and got this printout using the following patch:

diff --git a/autoload/choosewin/util.vim b/autoload/choosewin/util.vim
index c15ca74..1cd2b99 100644
--- a/autoload/choosewin/util.vim
+++ b/autoload/choosewin/util.vim
@@ -30,6 +30,7 @@ function! s:buffer_options_set(bufnr, options) "{{{1
   let R = {}
   for [var, val] in items(a:options)
     let R[var] = getbufvar(a:bufnr, var)
+    echom string(a:bufnr) . ' buffer_options_set: ' . var . ': ' . string(R[var]) . ' ---set-to--> ' . string(val)
     call setbufvar(a:bufnr, var, val)
     unlet var val
   endfor
1 buffer_options_set: &guitablabel: '' ---set-to--> '%{choosewin#get_tablabel(v:lnum)}'

According to neovim's documentation at :h nvim-missing, guitablabel is not a thing:

==============================================================================
Missing features                                         *nvim-missing*

These legacy Vim features are not yet implemented:

- *:gui*
- *:gvim*
- *'browsedir'* *'bsdir'*
- *'completepopup'*
- *'guioptions'* *'go'*
- *'guitablabel'* *'gtl'*
- *'guitabtooltip'* *'gtt'*
- *'mouseshape'* *'mouses'*
- *'previewpopup'*

Vim version:

❯ /opt/homebrew/opt/vim/bin/vim --version
VIM - Vi IMproved 9.2 (2026 Feb 14, compiled Mar 03 2026 19:50:15)
macOS version - arm64
Included patches: 1-100
Compiled by Homebrew
Huge version without GUI.  Features included (+) or not (-):
+acl                 +jumplist            +sodium
+arabic              +keymap              +sound
+autocmd             +lambda              +spell
+autochdir           +langmap             +startuptime
-autoservername      +libcall             +statusline
-balloon_eval        +linebreak           -sun_workshop
+balloon_eval_term   +lispindent          +syntax
-browse              +listcmds            +tabpanel
++builtin_terms      +localmap            +tag_binary
+byte_offset         +lua                 -tag_old_static
+channel             +menu                -tag_any_white
+cindent             +mksession           -tcl
+clientserver        +modify_fname        +termguicolors
+clipboard           +mouse               +terminal
+clipboard_provider  -mouseshape          +terminfo
+cmdline_compl       +mouse_dec           +termresponse
+cmdline_hist        -mouse_gpm           +textobjects
+cmdline_info        -mouse_jsbterm       +textprop
+comments            +mouse_netterm       +timers
+conceal             +mouse_sgr           +title
+cryptv              -mouse_sysmouse      -toolbar
+cscope              +mouse_urxvt         +user_commands
+cursorbind          +mouse_xterm         +vartabs
+cursorshape         +multi_byte          +vertsplit
+dialog_con          +multi_lang          +vim9script
+diff                -mzscheme            +viminfo
+digraphs            +netbeans_intg       +virtualedit
-dnd                 +num64               +visual
-ebcdic              +packages            +visualextra
+emacs_tags          +path_extra          +vreplace
+eval                +perl                -wayland
+ex_extra            +persistent_undo     -wayland_clipboard
+extra_search        +popupwin            -wayland_focus_steal
-farsi               +postscript          +wildignore
+file_in_path        +printer             +wildmenu
+find_in_path        +profile             +windows
+float               -python              +writebackup
+folding             +python3             -X11
-footer              +quickfix            -xattr
+fork()              +reltime             -xfontset
+gettext             +rightleft           -xim
-hangul_input        +ruby                -xpm
+iconv               +scrollbind          -xsmp
+insert_expand       +signs               -xterm_clipboard
+ipv6                +smartindent         -xterm_save
+job                 +socketserver
   system vimrc file: "$VIM/vimrc"
     user vimrc file: "$HOME/.vimrc"
 2nd user vimrc file: "~/.vim/vimrc"
 3rd user vimrc file: "~/.config/vim/vimrc"
      user exrc file: "$HOME/.exrc"
       defaults file: "$VIMRUNTIME/defaults.vim"
  fall-back for $VIM: "/opt/homebrew/share/vim"
Compilation: clang -c -I. -Iproto -DHAVE_CONFIG_H -DMACOS_X -DMACOS_X_DARWIN -g -O2 -D_REENTRANT -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
Linking: clang -o vim -lm -lncurses -lsodium -liconv -lintl -framework AppKit -L/opt/homebrew/opt/lua@5.4/lib -llua5.4 -fstack-protector-strong -L/System/Library/Perl/5.34/darwin-thread-multi-2level/CORE -lperl -L/opt/homebrew/opt/python@3.14/Frameworks/Python.framework/Versions/3.14/lib/python3.14/config-3.14-darwin -lpython3.14 -framework CoreFoundation -lruby.4.0 -L/opt/homebrew/Cellar/ruby/4.0.1/lib

Neovim version:

❯ /opt/homebrew/opt/neovim/bin/nvim -V1 -v
NVIM v0.11.6
Build type: Release
LuaJIT 2.1.1767980792

   system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "/opt/homebrew/Cellar/neovim/0.11.6/share/nvim"

Run :checkhealth for more info

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions