I’m trying to achieve a setup where certain “supplemental” buffers are kept in a separate OS window from my primary editor content. This separate window could be placed on a secondary display. The sorts of supplemental buffers I’m talking about are:
- Quickfix list and friends
- Debug console/UI (see nvim-dap-ui)
- Vim help
- Filesystem explorer
- Etc
You get the idea-- this sort of stuff is often jarring to bring up in the main OS window, because it reshapes the existing editor windows (i.e. panes). You can somewhat alleviate the problem by using floating windows, but this isn’t ideal either, since it obscures on-screen content and makes it difficult to cross-reference supplemental material with that content. A much better UX could be achieved by keeping a separate window for the supplemental material.
However, I’m not aware of any way to do this-- I use VimR and multiple windows seem to contain totally different nvim
instances. Is there any way to use multiple OS windows for a single underlying nvim instance? If not, is a suitable API on the roadmap?
I can think of a hacky way in which there is a separate process running parallel to Neovim. Neovim can then send messages to that process like “display documentation with these contents” and the companion process would draw the actual window. You can change the implementation of the LSP callbacks, that way all of the LSP client should work easily. I have no idea about anything else though.
It sounds like a lot of work and I am not aware of any such solution. Maybe a GUI could do it out of the box.
Thanks for the suggestion HiPhish-- what I’ve ended up doing for now is actually running multiple nvim instances that can communicate with each other over RPC. However, this set up is not ideal. It would be great if both windows could connect to the same instance.
The fact that one of the “Major Topics” on the Official Roadmap is “Ubiquity: embed Neovim everywhere” gives me hope this will be possible in the future. I also see that “TUI as a remote UI” is slated for 0.9. That sounds related.
Can someone with more knowledge weigh in on whether multiple windows for one instance is (a) possible now; (b) will be made possible as a consequence of future plans?