emacs-lsp / emacs-ccls

Emacs client for ccls, a C/C++ language server
200 stars 29 forks source link

Flycheck says iostream and local lib cannot be imported but LSP commands works as expected #88

Closed jaza-syed closed 4 years ago

jaza-syed commented 4 years ago

I'm trying to get ccls working on a toy project in MacOS Catalina. I'm using the latest stable ccls and clang++ from homebrew.

The screenshot attached shows the structure of the project and the current errors.

It says that <iostream> and "lib.h" cannot be found - however if I use lsp-find-definition it goes to the relevant header file in both cases. I ordered the imports in main.cpp to illustrate the error with lib.h as ccls only reports the first failed import. The definition of the "<<" operator seems not to have been imported either.

I'm using Doom Emacs, the only potentially relevant line in my config is (setq lsp-diagnostic-package :flycheck).

Screenshot 2020-06-10 at 17 00 28

jaza-syed commented 4 years ago

After looking through the ccls issues I found that this is just an instance of https://github.com/MaskRay/ccls/issues/622