-
-
Notifications
You must be signed in to change notification settings - Fork 34
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
Support class and style files #53
Comments
If I interpret these lines correctly: ltex-ls/ltexls-core/src/main/java/org/bsplines/ltexls/server/LtexWorkspaceService.java Lines 76 to 77 in 403f315
ltex-ls/ltexls-core/src/main/java/org/bsplines/ltexls/server/LtexWorkspaceService.java Lines 99 to 104 in 403f315
LTEX-LS should first decide on |
Language servers use the language ID of the text document when they “[handle] more than one language to avoid re-interpreting the file extension” (see LSP spec). So LTEX LS does this as well. Remember that the document URL may just be something like The code you quote is from a function called LTEX LS's code tries to distinguish whenever it can between the code language (LATEX, Markdown, etc.) and the (natural) language (English, German, etc.) of the document. Classic language servers deal with only one layer of language, as they usually don't have to bother with natural languages; therefore, this terminology is not present in the LSP spec. When I say code language ID in the following, I mean When a file is checked through the usual way, i.e., automatic checks triggered by Regarding the actual feature request, I'm not sure what the proposed solution should look like. If you tell LTEX LS that a class/style file is Regarding the second related question, if the code language ID is not |
I may have found the issue in my side. The ST client sends |
I found the issue: The ST client indeed sends the |
I thought the problem of this issue was that there were too many false positives with class and style files (see issue description)? Now it sounds like there were no diagnostics at all due to the language ID mismatch? Can you please clarify what exactly the problem of this issue is, and what the desired solution should look like? I doubt that we should check class or style files by default, as they usually consist mostly of TEX code (maybe with a little bit of LATEX in it) with hardly any natural text, e.g., this example. That's why |
It's the languageId mismatch. The false positives were a result of that. In my opinion I would at least allow TeX files to be parsed and not handle the id |
Ok. I'm still not convinced it's a good idea to check these files, but it doesn't hurt to let the client decide by adding |
Fix released in 11.0.0. |
Is your feature request related to a problem? Please describe.
LTEX-LS reports a lot of false positives in
cls
andsty
files.Describe the solution you'd like
Support
cls
andsty
files.Related question
Does LTEX-LS distinguish filetypes over
languageId
or by file extension? Is LaTex filtering of commands disabled if the languageId (or extension) does not match?The text was updated successfully, but these errors were encountered: