0

I'm a Mac user with complete lua config. I have tried installing sumneko_lua in Neovim 0.6.1 several times but without success. Frustration led me to open this question. I have also read and tried to follow several tutorials but without success.

The official one all clear but not the last point: I run in my terminal: ./bin/lua-language-server with this infinite output:

{"jsonrpc":"2.0","method":"$/status/report","params":{"text":"😺Lua","tooltip":"Cached files: 0/0\nMemory usage: 2M"}}Content-Length: 120

{"jsonrpc":"2.0","method":"$/status/report","params":{"text":"😺Lua","tooltip":"Cached files: 0/0\nMemory usage: 1M"}}

About the official setup, what it literally means: The default cmd assumes that the lua-language-server binary can be found in $PATH. What exactly should I do?

In older tutorials this and this (min 8:30) I found that this line is missing in official config: cmd = {sumneko_binary_path, "-E", sumneko_root_path .. "/main.lua"};

Opening a lua file I have this error:

Spawning language server with cmd: `lua-language-server` failed. The language server is
either not installed, missing from PATH, or not executable.
Spawning language server with cmd: `lua-language-server` failed. The language server is
either not installed, missing from PATH, or not executable.

I also tried to follow these tutorials mentioned above unsuccessfully. The first, it does not solve where and how to use this path export PATH="$HOME/tools/lua-language-server/bin/macOS:$PATH". The second, opening a lua file, manages to start the configuration: not in my setup.

Is there anyone who can clearly indicate all the steps for a correct and complete configuration?

3
  • probably you want to export PATH to include the directory that your lua-language-server program is in
    – D. Ben Knoble
    Mar 29, 2022 at 16:52
  • put that in an answer, please'
    – D. Ben Knoble
    Nov 16, 2022 at 16:47
  • @D.BenKnoble ok, posted
    – Joannes
    Nov 21, 2022 at 19:43

1 Answer 1

1

SOLUTION - If you using Homebrew you can install lua-language-server with brew install lua-language-server and you're done!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.