neovim - LSP for cc++ on Windows only works when I have Visual Studio installed - Stack Overflow

On Windows, my lsp doesnt work if I dont have visual studio installed. I used to only have a hdd and be

On Windows, my lsp doesnt work if I dont have visual studio installed. I used to only have a hdd and befor trying nvim I was using Visual Studio (the purple one) for c/c++ programming. The config worked fine, but when I tried, the same config, on my notebook running Windows it didnt work? I keept slamming my head against the table for a few hours and SOMEHOW I discovered it was because I had Visual Studio installed on my main pc. I installed Visual Studio on the notebook and the LSP worked. Now I have linux on my notebook and I use the same config; works fine. Does someone know why that happens? The path for gcc/g++/clang is set, I can compile from the terminal, and as I stated, the problem is not on the config, since THE SAME CONFIG works when Visual Studio is installed.

Just to complement, I use mason and lspconfig, gcc/g++/clang were installed via msys2.

On Windows, my lsp doesnt work if I dont have visual studio installed. I used to only have a hdd and befor trying nvim I was using Visual Studio (the purple one) for c/c++ programming. The config worked fine, but when I tried, the same config, on my notebook running Windows it didnt work? I keept slamming my head against the table for a few hours and SOMEHOW I discovered it was because I had Visual Studio installed on my main pc. I installed Visual Studio on the notebook and the LSP worked. Now I have linux on my notebook and I use the same config; works fine. Does someone know why that happens? The path for gcc/g++/clang is set, I can compile from the terminal, and as I stated, the problem is not on the config, since THE SAME CONFIG works when Visual Studio is installed.

Just to complement, I use mason and lspconfig, gcc/g++/clang were installed via msys2.

Share Improve this question asked Mar 3 at 4:26 EnderMegaEnderMega 3431 gold badge2 silver badges13 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 0

Which C++ language server are you using? The language server is different from the compiler. None of gcc/g++/clang provides a language server. Likely the toolchain installed together with Visual Studio happened to include a language server, e.g., clangd.

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745109703a4611773.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信