Open memeplex opened 4 weeks ago
What's the purpose of having an integrated pdfjs viewer? LaTeX Workshop needs one for previewing but we don't need for the same reason. I guess Quarto is same. It seems like the external pdf viewers are often playing better on pdf features, like adobe pdf and samutrapdf.
I tend to agree since in tinymist most of the previewing is done through typst.ts, but I'm not sure that there is a way to open an external pdf viewer from VSCode. Currently if you don't have additional extensions installed the preview pdf button opens the source code of the pdf. If an external viewer could be configured I'm all for it
we can have something like tinymist.pdfViewer
which specify some program for opening pdf files. Before this, perhaps there is also some builtin way to configure a program for opening PDFs in VSCode. It is worth to have an investigation.
If we agree on this, we can change the issue to need the capability to configure the way of opening PDFs.
Yes, I agree. IIRC there is an extension to open external viewers, but it would be nice to avoid that dependency if that's not too hard to implement.
Is this issue limited to vscode plugin all the whole language server?
I don't see any gain in adding this as a, say, subcommand of the language server. At the command line it's trivial to open your favourite viewer. In most other editors, as neovim, it's also trivial to hack up a couple of lines to do it. The problem is VSCode that for all its configurability it's not actually extensible (other than by installing an existing extension) if you're not willing to pull your own extension with all the required tooling and scaffolding alongside.
Motivation
Most pdf viewer extensions are outdated, or are part of large extensions (Quarto, LaTeX Workshop), or are a bit sketchy.
I've some experience in integrating pdfjs to VSCode. If you agree I could add it to tinymist (right now I'm extremely busy, but in a few weeks I could do it).