1

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.

1 Answer 1

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.

Sign up to request clarification or add additional context in comments.

1 Comment

Isn't it Mason that installs LSPs? I have booth mason and lsp-config and I installed clangd as my LSP throught mason.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.