Skip to content

Add IntelliSense for C++20 modules importing #6302

Open

Description

See the previous Windows/cl.exe-only issue at #6290 (UPDATE: the issue was deleted, see #8256 (comment) ).

NOTE: C++20 modules importing works for cl.exe if you set /ifcSearchDir (and possibly other modules args if necessary); however the IntelliSense support is still in active development so there are lots of known issues/bugs still.

This is dependent on IntelliSense parser changes from VS (i.e. open file Linux solutions in VS don't have module importing support for IntelliSense either).

EDIT: example here: #6302 (comment)

Activity

  1. changed the title [-]Add cross-platform IntelliSense for C++20 modules importing[/-] [+]Add IntelliSense for C++20 modules importing[/+] on Oct 13, 2021
  2. cjwijtmans commented on Oct 16, 2021

    @cjwijtmans

    Is there any way to get it somewhat working or does it not parse .ifc files at all?

  3. sean-mcmanus commented on Oct 19, 2021

    @sean-mcmanus
    ContributorAuthor

    Christ-Jan Wijtmans (@cjwijtmans) It may work with msvc mode with .ifc files for cl.exe, but it's not officialy supported yet. We process /headerUnit, /ifcSearchDir, /reference, and /stdIfcDir in compilerArgs.

  4. Bigous commented on Mar 8, 2022

    @Bigous

    I don't know if it's only for me, but #6290 just goes to 404 error...
    The intellisense is not working for imports at all.

    The definition:
    image

    And whe we use it:
    image

    But the compiler has no complains....

    image

  5. sean-mcmanus commented on Mar 8, 2022

    @sean-mcmanus
    ContributorAuthor

    Richard Natal (@Bigous) It's not officially supported, but we do have code that processes various modules command lines. Can you provide the command line args you're using in compilerArgs, particularly those that are modules-related?

  6. Bigous commented on Mar 9, 2022

    @Bigous

    Hi Sean McManus (@sean-mcmanus) , actually I'm using the CMake to build... but essentially it's /std:c++latest /experimental:module /EHsc /MD.

    It's a project to learn what C++20 brings and I really liked the module feature. I think it will save tons of time in compile.

    I just uploaded the project to github so you can see all easily

  7. sean-mcmanus commented on Mar 9, 2022

    @sean-mcmanus
    ContributorAuthor
    1. You currently need to change it to something like target_compile_options(cpp20 PRIVATE "/experimental:module" "/ifcSearchDir\"C:\\pathTo\\build\""), i.e. see https://devblogs.microsoft.com/cppblog/standard-c20-modules-support-with-msvc-in-visual-studio-2019-version-16-8/ .
    2. But I'm seeing error "IFC file "C:\pathTo\build\Utils.Numbers.ifc" has unsupported version 0.41", so I'm looking into that...
  8. 140 remaining items

  9. Sunrisepeak commented on Sep 25, 2026

    @Sunrisepeak

    I have a question, what is blocking this issue?

    pending community PR? or any internal PR?

    Image I have use g++ 16 in Ubuntu 26.04.1

    I developed a tool called "C++ Modules Language Server (mcppls)" for C++ modules; you might want to give it a try.

    Support

    • toolchains: gcc / msvc / llvm/clang
    • Editor LSP: VSCode / Neovim / Zed / Clion
    • L1 ~ L4 (only source, no compiler)

    Note: mcppls is currently only an early-stage project; it can be used as a temporary option for those who urgently need to use C++ Modules.

  10. miss-programgamer commented on Sep 25, 2026

    @miss-programgamer

    That's the noisiest, crustiest gif I've ever seen.

  11. robindegen commented on Sep 25, 2026

    @robindegen

    be cautious as there are only a handful of giant commits. This thing spawned out of nowhere.

    If its real, great job. But exercise caution as it doesn't look like a typical project to me in the way it is managed.

  12. Sunrisepeak commented on Sep 25, 2026

    @Sunrisepeak

    be cautious as there are only a handful of giant commits. This thing spawned out of nowhere.

    If its real, great job. But exercise caution as it doesn't look like a typical project to me in the way it is managed.

    I am a C++ Modules enthusiast, mcppls is built using the mcpp build tool. and mcppls have a tiny ci matrix for it, feel free to try it out (or as a temporary transitional solution), and please provide feedback if you encounter any problems.

  13. soroshsabz commented on Sep 25, 2026

    @soroshsabz

    SPeak (@Sunrisepeak) so any plan to submit a PR for this feature (in 2026 bug) on this repo?

    If you don’t have the time or interest, we could submit a PR using your source code instead—though I think it would be better if you were the one to submit it.

  14. soroshsabz commented on Sep 25, 2026

    @soroshsabz
  15. Sunrisepeak commented on Sep 25, 2026

    @Sunrisepeak

    SPeak (@Sunrisepeak) so any plan to submit a PR for this feature (in 2026 bug) on this repo?

    If you don’t have the time or interest, we could submit a PR using your source code instead—though I think it would be better if you were the one to submit it.

    A PR won't help here: the IntelliSense engine is a closed-source EDG binary(#6302 (comment)), and this repo is mostly the TS extension. As a temporary transitional solution, use a separate language server with "C_Cpp.intelliSenseEngine": "disabled". Options: mcppls, or clice (nearing stable).

  16. soroshsabz commented on Sep 25, 2026

    @soroshsabz

    SPeak (@Sunrisepeak) I think maybe we can use dual backend provider in this project (EDG and another modern engine)

    maybe this approach open road to replacement EDG

  17. soroshsabz commented on Sep 25, 2026

    @soroshsabz

    Sean McManus (@sean-mcmanus) Colen Garoutte-Carson (@Colengms) do you open to this approach? (dual engine)

    in another word if any PR with approach submit, do you accept that or not?

  18. a4z commented on Sep 29, 2026

    @a4z

    I have to wonder why MS doesn't just advise Copilot to do the job and fix this.
    Don't they trust their own product, or would the token cost be too high?
    :-)

  19. MathiasMagnus commented on Sep 30, 2026

    @MathiasMagnus

    This issue decaying into a discussion rather than being an issue tracker, I'll just leave this here for whoever wants a solution today without jumping through hoops. Here's a minimal setup with clangd that works today with Clang/libc++, GCC/libstdc++, MSVC/MS-STL with CMake, all in VSCode. (Clang/MS-STL doesn't, but it's a Clang issue, not clangd specifically.)

    Happy C++23 coding, just disable cpptools lannguage services (or don't even install it), and use it for debugging only (or use the lldb extension for that too). Revisit cpptools when it has the features you need.

  20. sharadhr commented on Sep 30, 2026

    @sharadhr

    The EDG compiler which powers VS and VS Code IntelliSense is now open-source.

    Going forward, I reckon we should contribute issues, changes, and fixes there directly.

  21. soroshsabz commented on Sep 30, 2026

    @soroshsabz

    SPeak (@Sunrisepeak) So, at now do you want to provide PR on https://github.com/edgcpp/compiler ?

  22. soroshsabz commented on Oct 15, 2026

    @soroshsabz
  23. soroshsabz commented on Oct 16, 2026

    @soroshsabz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    • Status
      No status

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions