-
Notifications
You must be signed in to change notification settings - Fork 42
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
Breaking changes in LanguageTool #110
Comments
I got the same error message both on dpelle/vim-LanguageTool and on this plugin. For me, however, extracting LanguageTool-5.9.zip into $HOME/.local/share/nvim/plugged/vim-grammarous/misc made it work, but for my language, when I make a mistake, it shows what was the error, what is the context of it, but fails to underscore it correctly (I have exactly the same issue as this guy, though Russian is not my native language). Anyway, are you sure that you used correct option for the --lang parameter? If it still doesn't work then maybe you should give vim-LanguageTool a try with the LanguageTool-5.9. Note that I installed both this and the second plugin via vim-plug. |
Simple and temporary patch: I've created a fork and rolled it back to 5.9 (master...rodolfoap:vim-grammarous:master) so, I use:
Seems working for now. Sorry, no time to address the real issue. |
From the changelog:
We need to replace |
You don't need a fork. Just set the parameter:
And reinstall the plugin. |
Workaround for neovim lua config:
|
Four steps that fixed the bug on my mac Context: As others have pointed out, Grammarous depends on the java Language Tool, and when Language Tool 6.0 changed their API, deprecating the use of Step 1: Manually download https://www.languagetool.org/download/LanguageTool-5.9.zip. Step 2: Move LanguageTool to your Grammarous plugin's
Remember, your Step 3: Remove the recent Language Tool, which breaks, and use the older one now.
Step 4: Clean up your |
Can confirm @borisdev steps solved the issue for me (Linux). Although of course this just a band-aid and hopefully the maintainers will adjust the code to make it work with Language Tool 6. |
Thanks @borisdev, works for me! 🥇 |
You need to keep the "#" part for the plugin to find it, in lua you have to set it like so: vim.g["grammarous#jar_url"] = 'https://www.languagetool.org/download/LanguageTool-5.9.zip' |
I had a different error message "Grammar check failed with status 1" but the workaround fixed it for me too. Is vim-grammarous not mainted anymore? The last commit is from four years ago. |
LanguageTool 6.0 was released on 2022-12-29. It no longer supports the "--api" command line option, which was already deprecated in 5.9. If vim-grammarous was installed after the 6.0 release, running
:GrammarousCheck
leads to the following error:I thought I could temporarily fix this by manually downloading v5.9 from https://languagetool.org/download/ and replacing the 6.0 files (which, in my case, because I installed the plugin via packer on Arch, are in
~/.local/share/nvim/site/pack/packer/start/vim-grammarous/misc/LanguageTool-6.0
) with the 5.9 files, but this does not work: After doing this, the plugin runs without errors again, but it no longer detects any grammatical errors.As I found out by checking on another computer, this is also true if the plugin was installed before the 6.0 release and no files have been manually replaced. So if I'm not missing something major here, it seems like there was a breaking change in the LanguageTool API that completely breaks this plugin, no matter what version of the LanguageTool cli is installed locally.
The text was updated successfully, but these errors were encountered: