rohit-px2/nvui

[feature request] built in workspace function

Closed this issue · 9 comments

Is it possible to manage multiple nvim instances, each instance contains an individual session. This can help me jump between each project without closing or opening a new nvui window.

I've tried mksession and some session managers. They can jump between session but I can't open a brand new workspace. I have to open file, clean up buffer and save session before I swich
between those sessions. That's putting the cart before the horse.

I've seen goneovim did it: https://github.com/akiyosi/goneovim#workspaces. Don't know if it is possible to add this feature in nvui because I really love it.

Thanks for your contribution.

I think it could be done. It would probably need a little bit of refactoring first since the code assumes a single Nvim instance right now.

Awaiting for your good news :-)

It's been a while but I've added something like this in #117, you can create multiple editors in the same window and one editor is shown at any given time. You can move/select through the :NvuiEditor* commands and you can spawn a new instance using :NvuiEditorSpawn. If you have any suggestions let me know.

Got error on Arch Linux: Job 1, './build/nvui' terminated by signal SIGFPE (Floating point exception). Are there any trace back logging option?

No logging right now, but if you can build it in debug mode and run it through gdb it should show you which function/line the crash happened on. I'm not getting that error so it would definitely help pin it down.

This is the output. I am using g++ (GCC) 11.1.0.

(gdb) run
Starting program: /home/sh1marin/Codes/Cpp/nvui/nvui/build/nvui
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
[New Thread 0x7ffff2c71640 (LWP 10259)]
[New Thread 0x7ffff23a7640 (LWP 10260)]
[Detaching after fork from child process 10261]
[New Thread 0x7fffeb0f0640 (LWP 10262)]
[New Thread 0x7fffea8ef640 (LWP 10263)]

Thread 1 "nvui" received signal SIGFPE, Arithmetic exception.
0x000055555564b2cc in PopupMenuQ::update_dimensions (this=0x55555590e340) at /home/sh1marin/Codes/Cpp/nvui/nvui/src/popupmenu.cpp:377
377       height /= item_height();

That was helpful, thanks. I think the popup menu is updating before the font is set through set guifont, and the default dimensions are (0, 0) which causes the division by zero error. Once the font is set though (Neovim always sends an empty string for the guifont during startup) it gets initialized, I have no idea why the popup menu is updating so early.
I added a quickfix to make the item height always positive, does it work now?

It works perfectly! I really like this feature! Waiting for the new release!

Merged