Skip to content

Allow nonrecursive browse paths from custom providers #13886

Closed as not planned
Closed as not planned

Description

Feature Request

Hi! I'm not sure whether to treat this as a bug or a feature request, so feel free to relabel it.

In a c_cpp_properties.json file, you can add a * to the end of a browse path (e.g. C:\\my\\source\\folder\\*) to specify that it should only look for files directly in that folder and not recursively index subfolders. This doesn't seem to work when providing a browse configuration from a custom configuration provider. Cpptools will complain that the path doesn't exist and ignore it:

  Unable to index files from non-existent folder: C:\my\source\folder\*

In my case, the provider knows exactly which files are part of the project, and I want to limit which files cpptools indexes as much as possible to prevent it from finding potentially conflicting symbol definitions in unrelated files. Disabling the recursive lookup would help a lot (even better would be if a custom provider could provide a set of files to index instead of a set of directories).

Activity

  1. moved this from Todo to In progress in cpptoolson Aug 29, 2025
  2. moved this from In progress to Done in cpptoolson Aug 30, 2025
  3. added
    fixedCheck the Milestone for the release in which the fix is or will be available.
    on Aug 30, 2025
  4. icebox-test commented on Sep 1, 2025

    @icebox-test

    (even better would be if a custom provider could provide a set of files to index instead of a set of directories)

    Sean McManus (@sean-mcmanus) was this considered while this issue was fixed?

  5. sean-mcmanus commented on Sep 4, 2025

    @sean-mcmanus
    Contributor

    icebox-test Hampus Adolfsson (@HampusAdolfsson) https://github.com/microsoft/vscode-cpptools/releases/tag/v1.27.3 has a fix for the * not being used. Having a provider provide a set of files would require an API change from https://github.com/microsoft/vscode-cpptools-api/issues .

  6. icebox-test commented on Sep 4, 2025

    @icebox-test

    Sean McManus (@sean-mcmanus) would an API change also be required to specify specific files directly via includePath and browse.path in a c_cpp_properties.json file as forcedInclude already supports including specific files?
    Or is the API change only required to make this work with custom providers?
    Thank you for your help so far!

    I created a related issue in the project you linked microsoft/vscode-cpptools-api#73

  7. bobbrow commented on Sep 4, 2025

    @bobbrow
    Contributor

    It's been on our long-term plan to rework the API to allow for specifying specific files, but we hadn't created an issue for it. Thank you for opening the issue for us to track it. We will close this issue in favor of tracking the new one you opened instead.

  8. locked and limited conversation to collaborators on Oct 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Feature: Configuration ProviderRelated to the configurationProvider property, e.g. ms-vscode.cmake-tools, ms-vscode.makefile-tools.Language ServicebugfixedCheck the Milestone for the release in which the fix is or will be available.quick fix

Type

Projects

  • Status
    Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions