-
Notifications
You must be signed in to change notification settings - Fork 402
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
LaTeX #144
Comments
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 |
Have you installed the LaTex extension from |
I did not. Now I have. This is however only syntax highlighting, not compilation commands and preview <-> source sync? |
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. |
Opened up a PR to configure the language server here: rzukic/zed-latex#2. Note you need texlab installed, if you're on mac, you can run |
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 (James-Yu/LaTeX-Workshop#1427); don't know if you will have any luck. |
As a LaTeX user, I'd like to add a couple of notes, in case they can be useful for the development of the LaTeX support.
So LaTeX can be tricky, because actually there are 2 syntaxes and two wrapping styles in use. |
There is a LaTex extension now. |
An exrension to enable LSP support through texlab can hardly be called TeX/LaTeX support. An indispensible feature is bidirectional SyncTeX support. You click (+ some modifier, or alternatively you hit a key binding) on the source and you are transported to the corresponding place of the PDF preview, and clicking (+ some modifier) on the preview brings you to the corresponding place in the source. An integrated PDF viewer is not necessary, any external previewer that supports SyncTeX will suffice (I use skim). Also, maybe the foundation is already there and I just do not know how to enable it, but Zed should have a sidebar that could be configurable with various panes and one could be filled with commands (similar to what latex workshop does for LaTeX in VSCode), including panels of symbols. This, together with the speed and configurability of Zed would make it the ideal TeX/LaTeX/ConTeXt platform. |
https://github.com/latex-lsp/texlab/wiki/Previewing |
Maybe "off the table" is a bit strong, there's only a few things which extension authors can do right now. It's possible that we could see something like the webview ui toolkit from VSCode, but for Zed. But my guess is that something like that would just be more difficult to build with. People have been authoring UIs for the web for decades, nobody outside a few people have been using the "igpu" thing Zed are working on (which I'm assuming is part of their plan for future graphical extensions). Outside of the symbol pane, and a multi-file aware outline (we only have that for individual files), I don't see much blocking the zed-latex extension from having almost every other feature you would expect. Mostly leveraging texlab with manual configuration. |
I do not use texmaker because it is not native, and it looks and feels very extraneous to the environment. I think snippets are already somehow implemented in Zed, correct? Then I would only need an example or an explanation of how to set them up. |
With v0.0.7 of the latex extension, snippets should work out of the box. Try typing |
This works. But there should be, for mostly textual environments, also autocompletion of words according to a dictionary. VSCode has this, so this is a feature people expect. Or maybe I do not know how to trigger it? This should be independent of the LSP. |
Spell checking appears to be a contentious issue in Zed. There is currently a "Typos" extension however it's not very good at spotting errors. I would personally like to see Zed run spell checking on sections of the file that the syntax grammar recognises as "spell" areas in a similar way to neovim (with |
However, I was not referring to spell-checking. Maybe completion was the wrong word, but maybe "suggestions"? Such as, i am typing "typing" and while I am at "ty" a menu appears with "type, types, typing, typology, tycoon" etc. and I can either continue typing, or click on one option, or select it with the up/down arrows, or get rid of the menu with ESC until the end of the word. |
These two are usually dealt with together (the spell checking and suggestions will use the same dictionary for instance). "Spell-checking" is just the better term to search for developments elsewhere. I do agree that good spelling completions would be nice to have in Zed. |
Exactly. Since one of the goals of Zed is to be adopted (of course!), when we see the marketing of other solutions, the autocompletion/suggestion popup is always a prominent feature. People expect that (like the minimap). I understand that the priorities at the moment are to support all possible AI models, but adding other important UX features should not be delayedm, otherwise there may be an adoption problem (and I am talking seriously, since I really do like Zed). |
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:
tabular
environment, for example.align
environment.(sidenote: I don't even use Zed yet, though I'd really like to see this some time in future)
The text was updated successfully, but these errors were encountered: