zed-industries / extensions

Extensions for the Zed editor
569 stars 225 forks source link

LaTeX #144

Open MultisampledNight opened 1 year ago

MultisampledNight commented 1 year ago

Check for existing issues

Language

LaTeX

Tree Sitter parser link

https://github.com/latex-lsp/tree-sitter-latex

Language server link

https://github.com/latex-lsp/texlab

Misc notes

This could go a long way. Many students use LaTeX in order to take notes in lectures, and I think there these things are interesting to look at in addition to the syntax highlighting and LSP itself:

(sidenote: I don't even use Zed yet, though I'd really like to see this some time in future)

Sandybunting commented 5 months ago

This would definitely be trickier to implement, but in the long term, including a PDF view window would make Zed extremely attractive for this workflow. I'd love to use Zed for typesetting but, even if LSP support was included, I would be reluctant to leave behind the convenient live previewing of the PDF output that VSCode achieves with the Latex Workshop package (or, for Typst, the Typst LSP package).

LaTeX Workshop VSCode screenshot
mocenigo commented 4 months ago

I am very confused. I do not see LaTeX support if I open a LaTeX file into zed. If I click on "unknown" in the bottom right corner, I see a list of languages and TeX or LaTeX are not there.

Tree Sitter parser link

https://github.com/latex-lsp/tree-sitter-latex

Language server link

https://github.com/valentjn/vscode-ltex https://github.com/latex-lsp/texlab

Moshyfawn commented 4 months ago

If I click on "unknown" in the bottom right corner, I see a list of languages and TeX or LaTeX are not there.

Have you installed the LaTex extension from zed: extensions?

mocenigo commented 4 months ago

I did not. Now I have. This is however only syntax highlighting, not compilation commands and preview <-> source sync?

Moshyfawn commented 4 months ago

This is the extent of what the Zed language extensions can do at the moment, but there is more to come.

mocenigo commented 3 months ago

This is the extent of what the Zed language extensions can do at the moment, but there is more to come.

The development is happening at an astounding pace. I am amazed.

OliCallaghan commented 3 months ago

Opened up a PR to configure the language server here: https://github.com/rzukic/zed-latex/pull/2.

Note you need texlab installed, if you're on mac, you can run brew install texlab.

analytic-bias commented 3 months ago

I'd mention also https://www.gnu.org/software/auctex/manual/preview-latex.html. It allows Emacs users to hit a shortcut (or automatically when file saved etc) to render configured LaTeX environments and substitute in the rendered svg in-ppace in the editor. This has been hard to be supported in vscode (https://github.com/James-Yu/LaTeX-Workshop/issues/1427); don't know if you will have any luck.