williamboman / mason-lspconfig.nvim

Extension to mason.nvim that makes it easier to use lspconfig with mason.nvim.
Apache License 2.0
2.67k stars 162 forks source link

cucumber_language_server not loaded #249

Closed boojum closed 1 year ago

boojum commented 1 year ago

Problem description

The cucumber_language_server installs alright but it crashes upon load. It complains about not being able to find files from its own installation, specifically version.cjs.

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

Yes, as the language server is installed but has problems with accessing required files.

Neovim version (>= 0.7)

NVIM v0.10.0-dev Build type: RelWithDebInfo LuaJIT 2.1.0-beta3

Operating system/version

Linux coyote 6.2.0-24-generic #24-Ubuntu SMP PREEMPT_DYNAMIC Fri Jun 16 12:03:50 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux

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

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

Affected language servers

cucumber_language_server

Steps to reproduce

  1. Install cucumber_language_server via mason.
  2. Open any file recognised by the language server, for example *.feature.
  3. Observe :LspLog and notice the server crash.

Actual behavior

cucumber_language_server crashes on load because it can't find the required files, in this case its version.cjs.

Expected behavior

cucumber_language_server loads correctly.

LspInfo

Language client log: /home/boojum/.local/state/nvim/lsp.log
 Detected filetype:   cucumber

 0 client(s) attached to this buffer: 

 Other clients that match the filetype: cucumber

 Config: cucumber_language_server
    filetypes:         cucumber
    root directory:    /home/boojum/code/react-e2e
    cmd:               /home/boojum/.local/share/nvim/mason/bin/cucumber-language-server --stdio
    cmd is executable: true
    autostart:         true
    custom handlers:   

 Configured servers list: terraformls, bashls, denols, dockerls, emmet_ls, jsonls, ltex, graphql, pyright, rust_analyzer, sqlls, lua_ls, taplo, svelte, tsserver, yamlls, cssls, cssmodules_ls, cucumber_language_server, html, gopls, prismals

LspLog

[START][2023-07-03 14:39:52] LSP logging initiated
[ERROR][2023-07-03 14:39:52] .../vim/lsp/rpc.lua:677    "rpc"   "/home/boojum/.local/share/nvim/mason/bin/cucumber-language-server" "stderr"    "Error: Cannot find module '../src/version'\nRequire stack:\n- /home/boojum/.local/share/nvim/mason/packages/cucumber-language-server/node_modules/@cucumber/language-server/bin/cucumber-language-server.cjs\n    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:1070:15)\n    at Function.Module._load (node:internal/modules/cjs/loader:923:27)\n    at Module.require (node:internal/modules/cjs/loader:1137:19)\n    at require (node:internal/modules/helpers:121:18)\n    at Object.<anonymous> (/home/boojum/.local/share/nvim/mason/packages/cucumber-language-server/node_modules/@cucumber/language-server/bin/cucumber-language-server.cjs:7:21)\n    at Module._compile (node:internal/modules/cjs/loader:1255:14)\n    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1309:10)\n    at Module.load (node:internal/modules/cjs/loader:1113:32)\n    at Function.Module._load (node:internal/modules/cjs/loader:960:12)\n    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:83:12)\n"

Healthcheck

mason: require("mason.health").check()

mason.nvim ~
- OK mason.nvim version v1.5.0
- OK PATH: prepend
- OK Providers: 
    mason.providers.registry-api
    mason.providers.client
- OK neovim version >= 0.7.0

mason.nvim [Registries] ~
- OK Registry `github.com/mason-org/mason-registry version: 2023-07-03-naval-ziege` is installed.

mason.nvim [Core utils] ~
- OK unzip: `UnZip 6.00 of 20 April 2009, by Debian. Original by Info-ZIP.`
- OK wget: `GNU Wget 1.21.3 built on linux-gnu.`
- OK curl: `curl 7.88.1 (x86_64-pc-linux-gnu) libcurl/7.88.1 OpenSSL/3.0.8 zlib/1.2.13 brotli/1.0.9 zstd/1.5.4 libidn2/2.3.3 libpsl/0.21.2 (+libidn2/2.3.3) libssh/0.10.4/openssl/zlib nghttp2/1.52.0 librtmp/2.3`
- OK gzip: `gzip 1.12`
- OK tar: `tar (GNU tar) 1.34`
- OK bash: `GNU bash, version 5.2.15(1)-release (x86_64-pc-linux-gnu)`
- OK sh: `Ok`

mason.nvim [Languages] ~
- OK Ruby: `ruby 3.1.2p20 (2022-04-12 revision 4491bb740a) [x86_64-linux-gnu]`
- OK Composer: `Composer version 2.5.4 2023-02-15 13:10:06`
- OK luarocks: `/usr/bin/luarocks 3.8.0`
- OK PHP: `PHP 8.1.12-1ubuntu4 (cli) (built: Feb 22 2023 19:48:21) (NTS)`
- OK Go: `go version go1.20.5 linux/amd64`
- OK cargo: `cargo 1.70.0 (ec8a8a0ca 2023-04-25)`
- OK RubyGem: `3.3.15`
- WARNING julia: not available
  - ADVICE:
    - spawn: julia failed with exit code - and signal -. julia is not executable
- OK java: `openjdk version "17.0.7" 2023-04-18`
- OK JAVA_HOME: `openjdk version "17.0.7" 2023-04-18`
- OK node: `v20.3.0`
- OK python: `Python 3.11.4`
- OK javac: `javac 17.0.7`
- OK npm: `9.6.7`
- OK pip: `pip 23.1.2 from /home/boojum/.asdf/installs/python/3.11.4/lib/python3.11/site-packages/pip (python 3.11)`
- OK python venv: `Ok`

mason.nvim [GitHub] ~
- OK GitHub API rate limit. Used: 2. Remaining: 58. Limit: 60. Reset: Mon 03 Jul 2023 15:29:20.
  Install and authenticate via gh-cli to increase rate limit.

Screenshots or recordings

No response

williamboman commented 1 year ago

Hello! This is an upstream issue with the package https://github.com/cucumber/language-server/issues/79. There's an open PR that fixes this that hasn't been attended to, unfortunately it looks like the project is somewhat unmaintained.

williamboman commented 1 year ago

1.2.0 seems to be the last functional version, you can install it with :MasonInstall cucumber-language-server@1.2.0. I'll also change this to be the default version in the registry (https://github.com/mason-org/mason-registry/pull/2058).