typescript-go icon indicating copy to clipboard operation
typescript-go copied to clipboard

Diagnostics not shown in file peek views

Open mjbvz opened this issue 1 week ago • 2 comments

  1. Create two files:
// abc.ts
/**
 * @deprecated
 */
export function abc() { }
abc();
// other.ts
import { abc } from "./abc";

abc()
xyz;
  1. With only abc.ts open, run peek references on abc (you can also use the references codelens for this)

Bug In the peek view, no diagnostics are shown

Image

They are shown with TS 6.0

mjbvz avatar Dec 12 '25 20:12 mjbvz

We don't control this; is VS Code / the LSP client not opening that file and asking for diagnostics?

jakebailey avatar Dec 12 '25 20:12 jakebailey

Yes maybe an lsp issue? cc @dbaeumer

mjbvz avatar Dec 12 '25 20:12 mjbvz

VS Code and LSP issue :-(. I assume the new TS extension uses pull diagnostics. We pull for open editor tabs and I guess that VS Code is not representing editors in peek views in the tab model. @lramos15 is there a way to know about these peek editor tabs?

dbaeumer avatar Dec 15 '25 10:12 dbaeumer

Yes, we currently exclusively use pull diagnostic, which was how tsserver worked before, too. The TS extension then made the calls to ask for errors, so perhaps it already solved this issue once before?

jakebailey avatar Dec 15 '25 10:12 jakebailey

@lramos15 is there a way to know about these peek editor tabs?

I'm not sure maybe @bpasero knows. I don't think the tabs API is the right place to represent this, unless we have that be a member property on a tab since we want tabs to represent logical UI tabs. Maybe the text document API is better here?

lramos15 avatar Dec 15 '25 16:12 lramos15

@jrieken might have guidance

bpasero avatar Dec 15 '25 18:12 bpasero

Peek editors aren't tab-editors and I think the visible editors route needs to be taken here.

jrieken avatar Dec 16 '25 10:12 jrieken