vimspector
vimspector copied to clipboard
[Feature Request]: winbar support for neovim
Is your feature request related to a problem? Please describe. Support for a bar at the top of each window was added in https://github.com/neovim/neovim/pull/18562 along with click support too https://github.com/neovim/neovim/pull/18650
Describe the solution you'd like I will be gone for a while so opened this early before the next neovim release.
Sadly, it looks like neovim have decided to implement a completely incompatible version of the vim feature, so unless someone wants to contribute changes and tests for this, I'm unlikely to spend time on it.
I can't understand why the neovim devs decided to do that, but shrug.
For tabline, neovim extend it from just support limited function like %1T1 for mouse support to %1@CustomFunctionHere@1
The syntax is 1 to 1 from tabline to winbar
In vim
function! s:CustomWinBar()
call win_gotoid( g:vimspector_session_windows.code)
aunmenu WinBar
nnoremenu WinBar.▷\ ᶠ⁵ :call vimspector#Continue()<CR>
nnoremenu WinBar.↷\ ᶠ¹⁰ :call vimspector#StepOver()<CR>
nnoremenu WinBar.↓\ ᶠ¹¹ :call vimspector#StepInto()<CR>
nnoremenu WinBar.↑\ ˢᶠ¹¹ :call vimspector#StepOut()<CR>
nnoremenu WinBar.❘❘\ ᶠ⁶ :call vimspector#Pause()<CR>
nnoremenu WinBar.□\ ˢᶠ⁵ :call vimspector#Stop()<CR>
nnoremenu WinBar.⟲\ ᶜˢᶠ⁵ :call vimspector#Restart()<CR>
nnoremenu WinBar.✕\ ᶠ⁸ :call vimspector#Reset()<CR>
endfunction
In neovim :set winbar=%1@vimspector#Continue()@Continue%2@vimspector#StepOver()@StepOver
I think the completely incompatible version of vim is better but I will not be opinionated here.
It's not about what's better, it's about what level of hacks I am willing to maintain forever. I don't have tests for neovim, and I already have to maintain complete rewrites of all job control and popup functionality. Now I have to maintain rewrite of the winbar functionality too? ugh... I don't fancy it. Particularly as I use nunmenu, etc. in the output view which will be a pain to do equivalently using this winbar= setting, which requires construction of some complex string rather than a series of commands.
Anyway like I said, quality community contribution welcome. This particular change has no benefit to me, so I'm not likely to spend my limited free time working on it, sorry.
I think it will be better than "some complex string" after lua version of this is out.
Have a great day!
heh, there's 0 chance I'll maintain any Lua, though...
heh

let's keep this open in case someone wants to work on it.
Sadly, it looks like neovim have decided to implement a completely incompatible version of the vim feature, so unless someone wants to contribute changes and tests for this, I'm unlikely to spend time on it.
I can't understand why the neovim devs decided to do that, but shrug.
@puremourning Partially true :) It is an explicitly stated goal for nvim 0.8 to also support vim8 style WinBar menus. 0.8 is still in development software, some patience might be required before its features are feature complete.
@puremourning @bfredl Nvim v0.8.0 just released a few weeks ago with winbar support. Perhaps this can become a reality now?
@UnrealApex Did you read the conversation?
The author won't implement it unless neovim support vim8 winbar menus. However, you are welcome to make a pull request.
If, as @bfredl says the neovim api is going to be compatible with Vim's, then it should just be a one line change.
Any update on this?
The neovim api is nothing like the vim one. So no.
I see. Perhaps some day.
Unlikely, without community contribution.
@bfredl
It is an explicitly stated goal for nvim 0.8 to also support vim8 style WinBar menus.
I just checked and this doesn't seem to be the case in neovim 0.9. Confirm?
correct.
Well, I tried to implement this, despite the obtuse "API". Anyway looks like it's blocked by https://github.com/neovim/neovim/issues/23165