Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> Ultimately things like C++ code completion and intellisense require a lot of work and code to get right, and NeoVim/Vim attempts are not there yet, for example I had to give up when the only way to figure out what compilation flags a project uses meant configuring it manually.

Not sure if I understand this right, but have you heard of https://github.com/rizsotto/Bear?

It intercepts compilation calls to generate a clang compilation database used by C and C++ LSP implementations. This way you just have to compile the project the normal way, only wrapping the initial call (for example, to `make`) with bear: `bear make`.

Once you have the database, a LSP server like ccls should work out of the box with the project.



Had not heard of this. I've tried two different autocompletion systems Coc and YouCompleteMe on vim, and both failed to make it automatical enough.

Maybe if I had the time to figure out this Bear thing I would, but seriously VSCode already with vim -bindings works out of the box so why bother :)


Yeah, it's definitely a matter of preference.

For me, VS Code fails to be productive in a myriad of other ways which I cannot enumerate now because I always forget them, and vim is the productive powerhouse I know inside out, where everything makes sense.

So due to this I had the will to investigate and make this work the first time, which was painful back in the day, but now it feels rather out-of-the-box and automatic, especially since nvim 0.5.0 was released.

I still sometimes fire up VS Code when I get frustrated with something, but I always find something else broken there and go back to nvim.

One thing I'm eyeing though is Onivim 2, though it's not ready yet.




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: