Closed fillipe-gsm closed 2 years ago
Hello! Hm that's odd. These ltex-ls release files should bundle a compatible JRE. What architecture are you running (ARM or x64)?
Also, do you have the JAVA_HOME
environment variable set?
$ echo $JAVA_HOME
Hi, @williamboman , I think I figured it out.
As I mentioned before, I am not well-versed on Java, but I had to install a very specific version in order to run a work related project. And this specific version -- 8.0 Zulu -- was apparently too old for the ltex-ls
server. I tried updating to version 17 and it started with no issues.
Here are my Java version and JAVA_HOME
env variable values now with the working version:
> java --version
openjdk 17.0.2 2022-01-18
OpenJDK Runtime Environment Temurin-17.0.2+8 (build 17.0.2+8)
OpenJDK 64-Bit Server VM Temurin-17.0.2+8 (build 17.0.2+8, mixed mode, sharing)
> echo $JAVA_HOME
/home/fillipe/.sdkman/candidates/java/current
By the way, even tough it starts the only useful thing it seems to be doing is a grammar check; I see no latex/rst autocomplete functions or syntax checks. But I think this does not concern this plugin anymore :)
Thanks for the help!
Yeah I believe ltex-ls needs Java 11 or later in order to run. However, the ltex-ls
archives that are downloaded and unpacked actually include a JRE 11 distribution. I wonder why it doesn't just always use that one since it's always available, and ignore JAVA_HOME
should it be defined. It might make sense to unset the JAVA_HOME
variable from the environment used to start ltex-ls
(in this plugin).
I did not install java directly with the package manager; I had to use this sdkman. In fact, the JAVA_HOME
shows that in the path.
So I suppose it kinda overwrites the path for any other program, such as ltex-ls
.
Unfortunately I found this server not very useful and ended up installing texlab
for LaTeX files and actually nothing for rST documents :)
Thanks for the quick support!
Problem description
I realize this has been asked at least twice for this specific server (once for Windows and another for Linux), but the solutions there did not work for me.
My LSP configuration is shown below, but I get the same behavior even with the minimal setup of README -- all other servers work out of the box, except
ltex
.I also tried going to
/home/myuser/.local/share/nvim/lsp_servers/ltex/ltex-ls/bin
and runningltex-ls
directly, but I get the following errornot sure if this has anything to do or I am just not running it right -- I am not familiar with Java, so the latter may be possible.
Neovim version (>= 0.6)
NVIM v0.6.1 Build type: Release LuaJIT 2.1.0-beta3
Operating system/version
Manjaro Linux
I've recently downloaded the latest plugin version of both nvim-lsp-installer and nvim-lspconfig
Affected language servers
ltex-ls
Steps to reproduce
.rst
file with any (even empty) contents.Actual behavior
Server does not start with message "Client quits with exit code 1 and signal 0"
Expected behavior
Server starts
LspInfo
Healthcheck
Screenshots or recordings
No response