glacambre / firenvim

Embed Neovim in Chrome, Firefox & others.
GNU General Public License v3.0
4.76k stars 146 forks source link

Error using clangd in firenvim #1508

Closed registerGen closed 1 year ago

registerGen commented 1 year ago

What I tried to do

I have clangd installed in neovim.

Click any textarea, then :set ft=cpp.

What happened

clangd errored: Unable to handle compilation, expected exactly one compiler job in ''.

I'm not sure whether this is a clangd issue or not, but I'll just put it here.

Other LSP, for example, pyright, works fine.

glacambre commented 1 year ago

This error is independent from Firenvim. You can also trigger it from the command line by editing any file whose extension is .txt and then setting the filetype to c/cpp.

You can work around this by either changing the name of the files Firenvim uses or explicitly telling clangd the language used by your files (for clang you need to pass -x c or -x c++, I don't know if clangd accepts the same flag).

registerGen commented 1 year ago

That works, thanks!