Open Antomek opened 2 years ago
There are platform independent releases (without Java) and platform depended releases that come with Java.
Without knowing what the neovim plugin really does I suspect it just installs the platform independent release. I recommend checking out the plugin repo and open an issue there.
Out of curiosity are you on the ARM_64 Mac? I have the same issue on mine where running the exact same config with the exact same installation method on my Intel Mac works 100% fine.
EDIT: Additionally installing Java using skdman
doesn't fix the issue. Whatever is going on having Java installed doesn't seem to fix the issue.
As of this comment ltex-ls
is working as expected for me. This can probably be closed?
@mattamizer Were you able to fix the issue? Could you please explain how?
The OP states that (s)he's on a M1 Mac, so yes, it's an Arm64 processor. I'm having the same problem (ltex-ls also installed from Mason for Neovim).
Thanks.
@mattamizer Were you able to fix the issue? Could you please explain how?
The OP states that (s)he's on a M1 Mac, so yes, it's an Arm64 processor. I'm having the same problem (ltex-ls also installed from Mason for Neovim).
Thanks.
Sure! The way I solved this on my M1 was the following.
ltex-ls
using :LspUninstall
and remove any config from init.lua
sdk
. I installed a few different versions based on projects I need to work on but I think the default is 17.0.1-open
for meltex-ls
using :LspInstall
init.lua
I don't know if it was something I did or if something in Mason was updated in the meantime but it's working fine for me now.
Thanks! I followed those steps, except I installed the java runtime with brew install openjdk
and put it on the PATH
.
Running ltex-ls --help
gives
❯ ltex-ls --help 1m 4s 18:05:06
The operation couldn’t be completed. Unable to locate a Java Runtime.
Please visit http://www.java.com for information on installing Java.
Usage: ltex-ls [-hV] [--[no-]endless] [--host=<host>] [--log-file=<logFile>]
[--port=<port>] [--server-type=<serverType>]
So it seems to first fail ... and then work?!
Regardless, Neovim doesn't want it and complains that
[null-ls] failed to load builtin ltex_ls for method diagnostics
That's certainly interesting behavior. I'm not really sure what to make of that.
Mason.nvim will install platform independent ltex when using unix plat.
review the default install path $HOME/.local/share/nvim/mason/packages/ltex-ls
.
The simplest way to solve this is mannully download the platform dependent ltex and replace the unarchived.
referer: https://github.com/williamboman/mason.nvim/issues/1531
I made a PR to mason (mostly) fixing the issue: https://github.com/mason-org/mason-registry/pull/4311
See the comment I made in the mason-thread, which details what you need to change in your config to use the bundles JRE in nvim: https://github.com/williamboman/mason.nvim/issues/1531#issuecomment-1913117887
The PR has been merged, so nvim users using mason should have no troubles anymore at all. (Download just takes a bit more time because of the bundles JRE).
(Only for Linux, the JRE is not bundled and must be set manually via JAVA_HOME
)
First off, many thanks for your work on this wonderful LSP! I was using it very happily, but recently it stopped working for me.
Issue: ltex crashes upon starting
Immediately when opening a file that should trigger
ltex
, e.g. .tex, the server crashes.This is the log output:
Steps to reproduce
The error is due to me not having a Java installation:
However, this is slightly surprising to me as your README states:
I installed
ltex-ls
using Mason for neovim, so the problem may actually lie there, but until recently I had no issue using ltex.Is this a case of MacOS users having to install Java manually anyway, or did something go awry somewhere?
Version information