Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[#87] Set clangd fallbackFlags on Windows #103

Merged
merged 1 commit into from
Jun 2, 2023

Conversation

ghentschke
Copy link
Contributor

clangd has trouble on Windows machines to detect the system headers. Therefore we add the includes paths from the first project file opened by the LS client to the fallbackFlags.

see https://clangd.llvm.org/extensions#compilation-commands

LIMITATION: The include path detection by
ICBuildConfiguration.getScannerInformation works currently only for the clang compiler. g++/gcc doesn't work.

fixes #87

@ghentschke ghentschke requested a review from ruspl-afed June 1, 2023 15:09
@ghentschke ghentschke force-pushed the feat-issue-87 branch 2 times, most recently from a5752ae to a2f1333 Compare June 2, 2023 07:00
clangd has trouble on Windows machines to detect the system headers.
Therefore we add the includes paths from the first project file opened
by the LS client to the fallbackFlags.

see https://clangd.llvm.org/extensions#compilation-commands

LIMITATION: The include path detection by
ICBuildConfiguration.getScannerInformation works currently only for the
clang compiler. g++/gcc doesn't work.

fixes eclipse-cdt#87
Copy link
Member

@ruspl-afed ruspl-afed left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good as initial implementation. Some discussed improvement may follow in subsequent PRs

@ruspl-afed ruspl-afed merged commit 20310fa into eclipse-cdt:master Jun 2, 2023
@ghentschke
Copy link
Contributor Author

@ruspl-afed Thank you!

@ghentschke ghentschke deleted the feat-issue-87 branch June 2, 2023 08:49
@jonahgraham jonahgraham added this to the 1.0.0 milestone Sep 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Restart IDE when external C/C++ file is opened in active editor leads to clangd compilation commands fallback
3 participants