fix(lsp): correct SourceKit extensions for Objective-C and Objective-C++ files#29315
Open
amirlankalm wants to merge 1 commit into
Open
fix(lsp): correct SourceKit extensions for Objective-C and Objective-C++ files#29315amirlankalm wants to merge 1 commit into
amirlankalm wants to merge 1 commit into
Conversation
SourceKit was listing ".objc" and "objcpp" (no leading dot) instead of ".m" and ".mm". The LSP dispatcher matches via path.parse(file).ext which returns ".m" and ".mm" respectively, so SourceKit never activated for any Objective-C or Objective-C++ file. Closes anomalyco#29314
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue for this PR
Closes #19092
Type of change
What does this PR do?
Fixes the file extensions for the SourceKit language server so it activates for Objective-C (
.m) and Objective-C++ (.mm) files.The previous values were
".objc"and"objcpp"— these are VSCode language IDs, not file extensions."objcpp"was also missing the leading dot entirely. The LSP dispatcher atlsp/lsp.ts:261matches viapath.parse(file).ext, which returns".m"and".mm"respectively, so SourceKit never activated for any Objective-C or Objective-C++ file.The one-line fix aligns the extensions with what is already in
language.ts:```
".m": "objective-c"
".mm": "objective-cpp"
```
Users hitting this bug had to work around it by manually configuring
lsp.sourcekit-lsp.extensionsinopencode.jsonc(as documented in #19092). This removes the need for that workaround.How did you verify your code works?
lsp/lsp.ts:path.parse("MyClass.m").ext→".m", which now matches the updated extensions listlanguage.tsalready maps.m→"objective-c"and.mm→"objective-cpp", so the rest of the LSP pipeline expects these extensionsbun turbo typecheckScreenshots / recordings
N/A — LSP configuration change, no UI.
Checklist