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

fix(typescript): content-sensitive features are only allowed to return results in contiguous mapped ranges #243

Merged
merged 2 commits into from
Oct 26, 2024

Conversation

johnsoncodehk
Copy link
Member

Fixes vuejs/language-tools#4811, closes vuejs/language-tools#4906

In the past we mapped results in discrete mapping regions for all TS features, however for content-sensitive features (such as autocomplete/formatting), results should only be returned in continuous mapping regions.

Affected features:

  • getFormattingEditsForDocument
  • getFormattingEditsForRange
  • getFormattingEditsAfterKeystroke
  • getEditsForFileRename
  • getLinkedEditingRangeAtPosition
  • organizeImports
  • getDocumentHighlights
  • getEditsForRefactor
  • getCombinedCodeFix
  • getRenameInfo
  • getCodeFixesAtPosition
  • getEncodedSemanticClassifications
  • findRenameLocations
  • getCompletionsAtPosition
  • getCompletionEntryDetails

cc @piotrtomiak, @KazariEX

@johnsoncodehk johnsoncodehk changed the title fix(typescript): certain features are only allowed to return results in contiguous mapped ranges fix(typescript): content-sensitive features are only allowed to return results in contiguous mapped ranges Oct 26, 2024
Copy link

pkg-pr-new bot commented Oct 26, 2024

Open in Stackblitz

@volar/jsdelivr

pnpm add https://pkg.pr.new/volarjs/volar.js/@volar/jsdelivr@243

@volar/eslint

pnpm add https://pkg.pr.new/volarjs/volar.js/@volar/eslint@243

@volar/kit

pnpm add https://pkg.pr.new/volarjs/volar.js/@volar/kit@243

@volar/language-core

pnpm add https://pkg.pr.new/volarjs/volar.js/@volar/language-core@243

@volar/language-server

pnpm add https://pkg.pr.new/volarjs/volar.js/@volar/language-server@243

@volar/language-service

pnpm add https://pkg.pr.new/volarjs/volar.js/@volar/language-service@243

@volar/monaco

pnpm add https://pkg.pr.new/volarjs/volar.js/@volar/monaco@243

@volar/source-map

pnpm add https://pkg.pr.new/volarjs/volar.js/@volar/source-map@243

@volar/test-utils

pnpm add https://pkg.pr.new/volarjs/volar.js/@volar/test-utils@243

@volar/typescript

pnpm add https://pkg.pr.new/volarjs/volar.js/@volar/typescript@243

@volar/vscode

pnpm add https://pkg.pr.new/volarjs/volar.js/@volar/vscode@243

commit: 4e7fca8

@johnsoncodehk johnsoncodehk merged commit 6a7a28c into master Oct 26, 2024
9 checks passed
@johnsoncodehk johnsoncodehk deleted the fallbackToAnyMatch branch October 26, 2024 07:20
johnsoncodehk added a commit that referenced this pull request Oct 26, 2024
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.

The syntax highlighting is not applied when destructuring props
1 participant