Skip to content

Commit

Permalink
fix: avoid displaying inlayHints in diagnostic only virtual code
Browse files Browse the repository at this point in the history
  • Loading branch information
johnsoncodehk committed Apr 22, 2023
1 parent b0c975d commit 87cf023
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ export function register(context: LanguageServicePluginContext) {
if (!map)
return _inlayHint;

const position = map.toSourcePosition(_inlayHint.position);
const position = map.toSourcePosition(_inlayHint.position, data => !!data.semanticTokens /* todo */);
const edits = _inlayHint.textEdits
?.map(textEdit => transformer.asTextEdit(textEdit, range => map!.toSourceRange(range), map.virtualFileDocument))
.filter(notEmpty);
Expand Down

0 comments on commit 87cf023

Please sign in to comment.