-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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: No (error) diagnostics after Build Error #551
Comments
This seems low priority to me given a fix is incoming. The time/complexity to implement a texlab specific workaround for a bug they are fixing just seems like a suboptimal use of time. The error is almost certainly dumped to stderr, not sent via something we have access to via handler, so you'd have to parse the log dumped from all language servers to lsp.log, which is going to be messy, buggy, and something I wouldn't support merging. I don't know what you mean by trigger a request, does typing a comment fix the issue? (sends textDocumentDidChange)
Maybe @clason has an opinion as to the defaults. I don't know why the defaults are as they are, but it's incredibly easy for users to override them. |
I understand it is low priority, but it is also not clear when "the new version" of texlab will appear - could be anything. Also, "trigger a request" was not my wording, but pfoerster's one from latex-lsp/texlab#339. I am also unsure what it means exactly, but we could ask.
Certainly, I have overridden it myself, but it could be hard for someone to discover that this could be changed if it does not even appear in the defaults. I only discovered it in https://texlab.netlify.app/docs/reference/configuration. |
I asked, so we'll see what happens. We already link to https://texlab.netlify.app/docs/reference/configuration in CONFIG.md, so I'm not sure what else we can do |
Many thanks for being so helpful and proactive. And apologies for not having noticed that https://texlab.netlify.app/docs/reference/configuration appears in |
My (strong) opinion is that linting should be opt-in; especially for something as opinionated as (On another note, I don't find the build errors really useful, either, since for more complex documents, they tend to show up miles from where the actual errors are -- this is not texlab's fault, of course, but an issue with how TeX operates. YMMV.) |
@clason I agree about |
Update: if one uses |
I'm going to close this, as it is an upstream bug, but I have reached out to the texlab people, and if I hear back and there is a convenient workaround I will file a PR. |
thanks - as I mentioned, I now use tectonic and all is good. I now have no problem waiting for an update to texlab. Anyway, in case anyone complains about this, just send them here. |
@coxackie do you have the config for how you set up tectonic? |
Yet another
texlab
issue... latest nightlynvim
and latestlspconfig
, although these do not matter for the issue I am going to describe.To reproduce, create a minimal (wrong) latex file and save:
Note how "t" is missing from
\begin{documen}
. Now,:TexlabBuild
will reportBuild Error
as it should. But,:lua print(vim.lsp.diagnostic.get_count(0, 'Error'))
gives 0, instead of 1.I search and found this: latex-lsp/texlab#339. It is clearly
texlab
's issue. But, it says there that "you need to trigger another request or notification for texlab to pick up the changes". Not sure what this entails (evidently, it should parse the previously produced log file for the errors), but thetexlab
extension ofvs-code
seems to manage with it. I could not understand what the JS code does.Would it be possible somehow to "trigger another request or notification for texlab" in case of build error in the build function in order to pick up the errors?
As an aside, it certainly does not help in debugging a tex document that
latex.lint.onSave
is not set totrue
in the default configs intexlab.lua
, as is done here. At least if this is set, you can see some warnings from the linting side, but of course this is not the same as getting the exact error from building. On the other hand, I understand thatchktex
can be annoying with all the warnings it produces, and maybe this is whylatex.lint.onSave
is not defined intexlab.lua
.The text was updated successfully, but these errors were encountered: