Skip to content
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

Lua-Language-Server not executable #124

Closed
2 tasks done
simaxme opened this issue Jan 11, 2023 · 2 comments
Closed
2 tasks done

Lua-Language-Server not executable #124

simaxme opened this issue Jan 11, 2023 · 2 comments

Comments

@simaxme
Copy link

simaxme commented Jan 11, 2023

Problem description

Hello,
since a couple of days I have problems using the Lua-Language-Server using mason-lspconfig. Everytime I try to open any file, the lua client crashes. It seems the binary is not executable although i have already ran "chmod +x ./lua-language-server".

Why do you think this is an issue with mason-lspconfig.nvim?

The lua-language-server binary is part of the mason-lsp install system.

Neovim version (>= 0.7)

NVIM v0.8.1
Build type: Release
LuaJIT 2.1.0-beta3

Operating system/version

Linux nixos 5.15.83 #1-NixOS SMP Wed Dec 14 10:37:31 UTC 2022 x86_64 GNU/Linux

I've manually reviewed the Nvim LPS client log (:LspLog) to find potential errors

  • Yes

I've recently downloaded the latest plugin version of mason.nvim, mason-lspconfig.nvim, and nvim-lspconfig

  • Yes

Affected language servers

lua-language-server

Steps to reproduce

  1. Install mason-lsp with mason nvim
  2. Install lua-language-server through mason
  3. Open any lua file

Actual behavior

Client Crash; file not executable

Expected behavior

Ability of using the LSP in the file.

LspInfo

Language client log: /home/simon/.local/state/nvim/lsp.log
 Detected filetype:   lua
 
 1 client(s) attached to this buffer: 
 
 Client: copilot (id: 1, bufnr: [5])
 	filetypes:       
 	autostart:       true
 	root directory:  /home/simon/.config/nvim
 	cmd:             node /home/simon/.local/share/nvim/site/pack/packer/start/copilot.lua/copilot/index.js
 
 Other clients that match the filetype: lua
 
 Config: sumneko_lua
 	filetypes:         lua
 	root directory:    /home/simon/.config/nvim
 	cmd:               lua-language-server
 	cmd is executable: true
 	autostart:         true
 	custom handlers:

LspLog

No response

Healthcheck

mason: require("mason.health").check()
========================================================================
## mason.nvim report
  - OK: neovim version >= 0.7.0
  - WARNING: **Go**: not available
  - WARNING: **cargo**: not available
  - WARNING: **luarocks**: not available
  - OK: **Ruby**: `ruby 2.7.6p219 (2022-04-12 revision c9c2245c0a) [x86_64-linux]`
  - OK: **RubyGem**: `3.3.20`
  - WARNING: **Composer**: not available
  - WARNING: **PHP**: not available
  - OK: **npm**: `8.19.2`
  - OK: **node**: `v16.18.1`
  - OK: **python3**: `Python 3.9.15`
  - WARNING: **pip3**: not available
  - OK: **javac**: `javac 17.0.2`
  - OK: **java**: `openjdk version "17.0.2" 2022-01-18`
  - WARNING: **julia**: not available
  - OK: **wget**: `GNU Wget 1.21.3 übersetzt unter linux-gnu.`
  - OK: **curl**: `curl 7.86.0 (x86_64-pc-linux-gnu) libcurl/7.86.0 OpenSSL/3.0.7 zlib/1.2.13 brotli/1.0.9 zstd/1.5.2 libidn2/2.3.2 libssh2/1.10.0 nghttp2/1.49.0`
  - OK: **gzip**: `gzip 1.12`
  - OK: **tar**: `tar (GNU tar) 1.34`
  - WARNING: **pwsh**: not available
  - OK: **bash**: `GNU bash, Version 5.1.16(1)-release (x86_64-pc-linux-gnu)`
  - OK: **sh**: `Ok`
  - OK: **python3_host_prog**: `Python 3.10.8`
  - WARNING: **python3_host_prog pip**: not available

Screenshots or recordings

The same error like in LspLog
image

@williamboman
Copy link
Owner

Hey! NixOS generally cannot execute binaries that have been dynamically linked. In order to run these you need to patch these using tools like patchelf. However, I'd strongly recommend installing these packages through NixOS's package manager instead of Mason. Doing it through other software (such as Mason) is just fighting the distro, imo.

@JP-Go
Copy link

JP-Go commented Mar 11, 2023

@williamboman Hey. I know i'm a bit late for the discussion but isn't the point of having a plugin that downloads the tooling we use to program like language servers, linters, etc, to avoid the chore of having to download each of these tools through many other sources, and instead download it through a unified interface?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants