Open mslinn opened 9 months ago
Thanks for the feedback, @mslinn - I agree, my instructions are a bit outdated. My original thinking was to stick with relatively easy, cross-Linux instructions. LinuxBrew is no more, as it's been folded into Homebrew, which works on both MacOS and Linux.
I'll put this on my todo list. I'm reluctant to copy/paste from other sites as that means more work for keeping things updated, but I will link to instructions for some of the more popular distributions. I use Ubuntu as well as Homebrew. Alpine has come up as well in prior issues, and I suppose CentOS makes sense, too. If you have other distros you think would cover a broad group, let me know.
CentOS has been discontinued. Linux is so diverse that it would be difficult to provide instructions for all distros. Just telling people the snap installation line, then providing a link to the Ubuntu page would likely be enough.
Thanks, for the time you spent on the project :heart:
Same here, I never used *brew and was surprised to see it in the wiki. When I set up the server locally I used LanguageTool doc on how to setup the server using the jar file (it was a few years back).
Now some distro have package for it. You can find package availability for other distros on:
Configuring the linter was definitely confusing for me, but mostly because of gaps in the LanguageTool documentation (and in my knowledge about using java and .jar files).
To install on openSUSE Tumbleweed, this is what I did:
zypper install languagetool
I did not know if this was the same as the "desktop version for offline use" available from https://dev.languagetool.org/http-server. The openSUSE package installed LanguageTool in /usr/share/languagetool/
, which is where I found language-server.jar
.
zypper install python311-fasttext
Again, I was not sure if this was what I needed, but it worked successfully and created a fasttext
shell command. Note that the repo also includes python39-fasttext
, python310-fastext
, and python312-fasttext
packages. I chose python311-fasttext
to match the Python version (default) already on my system.
cd /usr/bin/
wget https://dl.fbaipublicfiles.com/fasttext/supervised-models/lid.176.bin
The instructions did not suggest where to save the model, so I used the same directory as the fastText executable.
server.properties
file in with the following contents.
fasttextModel=/usr/bin/lid.176.bin
fasttextBinary=/usr/bin/fasttext
The instructions did not suggest where to create the properties file or explain how to use an 'external' directory, so I used the same directory as languagetool-server.jar
(/usr/share/languagetool/
)
Start the LanguageTool server (from the usr/share/languagetool/
directory, as a regular user)
java -cp languagetool-server.jar org.languagetool.server.HTTPServer --config server.properties --port 8081 --allow-origin "*"
Note the asterisk, which is not shown in the LanguageTool documentation. The server failed to start until I added "*"
.
Follow the rest of the vscode-languagetool-linter instructions.
Edit: corrected server.properties contents.
The Wiki says:
I do not know anyone who uses LinuxBrew. The most popular Linux distro is Ubuntu, and it can use either PPA packages (installed using
apt
) and snaps.The official snap package for
languagetool
is here: https://snapcraft.io/install/languagetool/ubuntuYou could just copy their installation instructions: