Skip to content

fix(editor): use embedded language for definition previews - #329161

Open
liangmiQwQ wants to merge 4 commits into
microsoft:mainfrom
liangmiQwQ:liang/codex/fix-definition-preview-embedded-language
Open

fix(editor): use embedded language for definition previews#329161
liangmiQwQ wants to merge 4 commits into
microsoft:mainfrom
liangmiQwQ:liang/codex/fix-definition-preview-embedded-language

Conversation

@liangmiQwQ

Copy link
Copy Markdown

Close #329160

Instead of guessing the file type from the URL, it now use the exact language id from the code's position. So these problems will no longer exist.

🤖 This PR is submitted with help with Codex.

Copilot AI balanced review requested due to automatic review settings August 5, 2026 12:52
@liangmiQwQ

Copy link
Copy Markdown
Author

@microsoft-github-policy-service agree

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Updates definition previews to use the target model’s embedded language identifier for syntax highlighting.

Changes:

  • Resolves the language at the definition position.
  • Adds a regression test for embedded-language previews.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
goToDefinitionAtPosition.ts Uses tokenization to determine the preview language.
goToDefinitionAtPosition.test.ts Tests an embedded-language definition preview.

Comment thread src/vs/editor/contrib/gotoSymbol/browser/link/goToDefinitionAtPosition.ts Outdated
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.

Color of variable definition hoverbox is missed for embedded language

3 participants