latex-lsp / texlab

An implementation of the Language Server Protocol for LaTeX
GNU General Public License v3.0
1.55k stars 53 forks source link

Generic inverse search using show document request #1091

Closed knuesel closed 6 months ago

knuesel commented 6 months ago

Maybe the LSP showDocument method could be used for a generic implementation of synctex inverse search?

The idea would be that TexLab accepts a CLI flag as in texlab --inverse-search /some/file.tex:123 and forwards the request as a showDocument to the appropriate editor. This simplifies the configuration for the user as it works the same for all editors that support this request, even editors that don't otherwise support inverse search.

For example the Helix editor currently offers no way to open/show a file in a running instance, but inverse search could still work through showDocument. This has been done to implement inverse search for typst.