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

Support finding compile_commands.json in non root project directories #1484

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ChaseKnowlden
Copy link

@ChaseKnowlden ChaseKnowlden commented Apr 4, 2025

Before: focus: undefined

After:

19:13:49: Activating Swift for Visual Studio Code...
19:13:50: SourceKit-LSP setup
19:13:51: swift-data: add: /Users/chase/dev/swift-data
19:13:51: swift-data: focus: /Users/chase/dev/swift-data

Fix #1449

Copy link
Contributor

@plemarquand plemarquand left a comment

Choose a reason for hiding this comment

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

I think we should do the same as sourcekit-lsp and search in . and build, but hold off doing an expensive recursive search of all folders in the workspace folder.

To solve this properly I think we'd need to implement a setting in sourcekit-lsp to search for compile_commands.json in a supplied set of folders, and then mirror that setting in the VS Code extension, passing it to sourcekit-lsp on startup and using it here in isValidWorkspaceFolder as somewhere to search.

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.

Root-level compile_commands.json required for simple CMake projects
2 participants