-
-
Notifications
You must be signed in to change notification settings - Fork 2
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
LTeX commands don't work when ltex.enabled is set to false #106
Comments
You can start testing with the next nightly release. Please test carefully, because I had to change the logic significantly. |
I tried the latest nightly release, with the latest commit included, and it works well The "LTeX : Activate Extension" works well and can start the extension when ltex.enabled is set to false. However, I still find the way LTeX is triggered and started a bit weird (it is not related to the nightly release, the behavior is the same in older versions) : When ltex.enabled = false, I need to manually activate the extension with "LTeX : Activate Extension" command. Then, I need to use the "LTeX : Check Current Document" command to start checking a document, but it doesn't work well : for a .tex file, it checks the document but I have to run the command everytime I want to check the text again. The document is checked but I see this in the server logs : But for a markdown document, the "LTeX : Check Current Document" command doesn't work, and in the server logs I see : Note : in the .md document, I can still use the "LTeX : Check selection" command to check the entire file. Server Logs (at the beginning I use the "LTeX : Check Current Document" command for a .tex file, and at the end for a .md file :
Client logs :
If ltex.enabled is set to [], the behavior is the same. But if there is at least one language in the ltex.enabled list (ex : ltex.enabled = ["markdown"]), the extension is triggered for every language in the default ltex.enabled list, even if the current language is not in the ltex.enabled list in the settings (if ltex.enabled = ["markdown"], opening a .tex document launches the extension as if I've run "LTeX : Activate Extension", but the problems with checking documents are the same as above) So the problem is that we have to choose between
Currently the best solution for me is to keep the default ltex.enabled and manually close LTeX when I don't want it I guess it would be difficult to change this behavior and it is not a really big issue for most users, so maybe a fix is not really required. PS: Thanks for the amazing work you're doing on this extension. I might be pointing out some minor issues, but overall, the extension is excellent and much more stable than the classic LTeX. |
Thank you for your gratitude. The activation logic of LTeX+ (and also the original LTeX) is as follows:
If you open a document with a file type mentioned in the activationEvents, LTeX+ is triggered. Your setting of
The setting New in LTeX+ with commit 881b76d is following logic: If you run
I see your point that the logic of LTeX+ is quite weird. In my opinion, following logic is the most convenient for most of the users: This would be a breaking change and needs more work. |
I have to correct my previous statement: I have no clue why |
Thank you for your explanations.
On my computer,
I don't have any error message, and here are the logs for after doing client logs :
server logs :
I'm using VSCode on Ubuntu with no extensions, LTeX+ latest nightly and the only settings are : "ltex.ltex-ls.logLevel": "finest",
"ltex.trace.server": "verbose",
"ltex.enabled": false
I agree that this would be a really intuitive logic. I don't know anything about JavaScript/TypeScript so I can't really help in case you're willing to make those changes |
The original LTeX does not start the language server in this case. LTeX+ does it (see 881b76d)
I think there is no need to run Please do following steps:
|
But if in 6. I do So yes, after the initial But there is another problem : If I try this on a .md or .tex file instead of a plain text file, the document is not checked when I run This behavior is the same for every file that is not plain text, not only for the languages that are in the default |
You set |
I think that setting |
It's fixed now. You can test again with the next nightly release. |
I tested it and it seems fixed 👍
I think this idea is still relevant because even after the fixes you made, they are still some inconsistencies : for example, if a language is not in |
Describe the bug
When the setting "ltex.enabled" is set to false, None of the LTeX commands can be launch, and so it si impossible to activate the extension via the "LTeX : Activate Extension" command.
As explained here : https://ltex-plus.github.io/ltex-plus/settings.html#ltexenabled, when ltex.enabled is set to false, it should not check any language but still be able to be activated when needed
Steps to reproduce
Expected behavior
Commands should be available, especially to start the extension.
LTeX+ configuration
"LTeX+ Language Server" log file
"LTeX+ Language Client" log file
Version information
The text was updated successfully, but these errors were encountered: