-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Texlab does not build on save #2758
Comments
It's odd that the kak-lsp config is so different from nvim's. Maybe nvim is using a plugin to do the building? Kak-lsp's [language.latex.settings.texlab.build]
executable = "latexmk"
args = ["-pdf", "-interaction=nonstopmode", "-synctex=1", "%f"]
onSave = true
[language.latex.settings.texlab.chktex]
onOpenAndSave = true
onEdit = true translated to helix's config: # ~/.config/helix/languages.toml
[[language]]
name = "latex"
[language.config.build]
executable = "latexmk"
args = ["-pdf", "-interaction=nonstopmode", "-synctex=1", "%f"]
onSave = true
[language.config.chktex]
onOpenAndSave = true
onEdit = true Could you give that a try and see if it invokes latexmk? |
Just tried it, and it does not invoke latexmk. Based on helix's log output it looks like the values are being deserialized and passed to texlab in the form it wants, but for whatever reason it's not running external commands. Could this be a texlab bug? |
I use Helix with TexLab and build-on-save works for me. I think you need to replace [[language]]
name = "latex"
scope = "source.tex"
injection-regex = "tex"
file-types = ["tex"]
roots = []
comment-token = "%"
language-server = { command = "texlab" }
config = { texlab = { build = { onSave = true } } }
indent = { tab-width = 4, unit = "\t" } I think most of it is redundant with the default |
@Triton171, thank you so much! Using your configuration as a guide, I was able to set my configuration to match what I have in neovim. It's a bit awkward, but that's TOML's fault, not helix's. [[language]]
name = "latex"
config = { texlab = { build = { onSave = true, forwardSearchAfter = true }, forwardSearch = { executable = "zathura", args = [ "--synctex-forward", "%l:1:%f", "%p" ] }, chktex = { onEdit = true } } } |
Summary
I'm attempting to build and view compiled Latex documents when I save them. However, despite passing what I believe are identical options to texlab in helix as I use in neovim, documents are not built when using helix.
Reproduction Steps
asciinema recording: https://asciinema.org/a/q9zCJIBH6HUujHKsLfjuqBqfe
The recording doesn't show it, but the document was not compiled and built after writing.
My configurations for neovim and helix are listed below. I used #2063 (comment) as a template for my helix configuration. I did some searching and found latex-lsp/texlab#502 (comment) containing the right way to set these parameters in TOML for kakoune according to the texlab developers, but I'm unsure how to adapt this for helix.
Lua for Neovim
TOML for Helix
Helix log
~/.cache/helix/helix.log
Platform
Linux
Terminal Emulator
foot 1.12.1
Helix Version
helix 22.05
The text was updated successfully, but these errors were encountered: