I finally solved the problem. In short, it was the OpenBSD system resource limits that caused the issue. Obviously, nvim as an IDE is very resource-hungry. So, I had to tweak the staff class /etc/login.conf:
staff:\
:datasize-cur=2G:\
:datasize-max=unlimited:\
:stacksize=8M:\
:openfiles=8192:\
:maxproc-max=2048:\
:maxproc-cur=2048:\
:memorylocked=131072:\
:memoryuse=unlimited:\
:ignorenologin:\
:requirehome@:\
:tc=default:
and also create /etc/sysctl.conf with the following line:
kern.maxfiles=65536
Now everything works like a charm with the default settings I use also on other OSs such as Linux and DragonFlyBSD.
Special thanks to everybody and to Volker from the OpenBSD misc list, with whom I corresponded also in private. Special thanks also to ChatGPT and grok :)
Now that this is solved, I would be happy if you can comment on my resource limits. Maybe some settings can be further improved? This is my current default class:
default:\
:path=/usr/bin /bin /usr/sbin /sbin /usr/X11R6/bin /usr/local/bin
/usr/local/sbin:\
:umask=022:\
:datasize=unlimited:\
:maxproc-max=256:\
:maxproc-cur=128:\
:openfiles=8192:\
:stacksize-cur=4M:\
:localcipher=blowfish,a:\
:tc=auth-defaults:\
:tc=auth-ftp-defaults:
I think I tweaked some things here as well.
I am looking forward to your comments.
Best regards,
Martin