Skip to content
This repository has been archived by the owner on Nov 12, 2022. It is now read-only.

Nim language server doesn't start. #462

Closed
1 task done
Dich0tomy opened this issue Feb 7, 2022 · 5 comments
Closed
1 task done

Nim language server doesn't start. #462

Dich0tomy opened this issue Feb 7, 2022 · 5 comments

Comments

@Dich0tomy
Copy link

Problem description

I've successfully installed the nimlsp language server through LspInstall nimls.
i also added an autocommand that sets filetype to nim for nim files.

When opening a nim file, at the bottom it says

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

Then immediately after that

Client 2 quit with exit code 1 and signal 0

LspInfo shows

Unable to find executable. Please check your path and ensure the server is installed

And... well.. I would accept that, but afair the servers should be standalone? I should be just able to do LspInstall nimls and be ready to go, not install any external dependencies and somehow hook them up.

If that is not, however, the case, then I'm truly sorry for making this issue and wasting everyone's time :<.

Thanks in advance.

Neovim version (>= 0.6)

NVIM v0.7.0-dev+36a8f31
Build type: Release
LuaJIT 2.1.0-beta3

Operating system/version

Linux stacjonarny 5.4.72-microsoft-standard-WSL2 #1 SMP Wed Oct 28 23:40:43 UTC 2020 x86_64 GNU/Linux

I've recently downloaded the latest plugin version of both nvim-lsp-installer and nvim-lspconfig

  • Yes

Affected language servers

nimlsp

Actual behavior

It doesn't find the server executable.

Expected behavior

It should install and find the server executable (or should it?).

Healthcheck output

nvim-lsp-installer: require("nvim-lsp-installer.health").check()
========================================================================
## nvim-lsp-installer report
  - OK: neovim version >= 0.6.0
  - WARNING: Composer: not available
  - WARNING: PHP: not available
  - WARNING: julia: not available
  - OK: sh: `Ok`
  - OK: bash: `GNU bash, version 5.1.16(1)-release (x86_64-pc-linux-gnu)`
  - OK: gzip: `gzip 1.10`
  - OK: wget: `GNU Wget 1.21.2 built on linux-gnu.`
  - OK: python3: `Python 3.9.1`
  - OK: Ruby: `ruby 2.7.4p191 (2021-07-07 revision a21a3b7d23) [x86_64-linux-gnu]`
  - OK: Go: `go version go1.17.6 linux/amd64`
  - OK: tar: `tar (GNU tar) 1.34`
  - OK: curl: `curl 7.81.0 (x86_64-pc-linux-gnu) libcurl/7.81.0 OpenSSL/1.1.1m zlib/1.2.11 brotli/1.0.9 zstd/1.4.8             libidn2/2.3.2 libpsl/0.21.0 (+libidn2/2.3.0) libssh2/1.10.0 nghttp2/1.43.0 librtmp/2.3 OpenLDAP/2.4.59`
  - OK: RubyGem: `3.2.27`
  - OK: node: `v14.17.3`
  - OK: java: `Ok`
  - OK: javac: `javac 11.0.14`
  - OK: pip3: `pip 21.3.1 from /home/b4mbus/miniconda3/lib/python3.9/site-packages/pip (python 3.9)`
  - OK: npm: `8.3.0`

Screenshots

No response

@williamboman
Copy link
Owner

Hello! I'm able to repro this in https://github.com/williamboman/nvim-lspconfig-test - it seems like a new problem. The error seems to be the following (the :LspInfo error message does not seem to be entirely correct):

/Users/williamboman/.local/share/nvim/lsp_servers/nimls.tmp/src/nimlsppkg/logger.nim(5) logger
/Users/williamboman/.choosenim/toolchains/nim-1.6.2/lib/pure/logging.nim(572) newRollingFileLogger
/Users/williamboman/.choosenim/toolchains/nim-1.6.2/lib/system/io.nim(745) open
Error: unhandled exception: cannot open: /var/folders/ky/s6yyhm_d24d0jsrql4t8k4p40000gn/T/nimlsp/nimlsp.log [IOError]

@B4mbus Are you seeing the same error message as above in ~/.cache/nvim/lsp.log?

@Dich0tomy
Copy link
Author

@williamboman Hey!
My ~/.cache/nvim/lsp.log has the following error repeating over and over:

[START][2022-02-08 00:23:00] LSP logging initiated
[ERROR][2022-02-08 00:23:00] .../vim/lsp/rpc.lua:420  "rpc" "nimlsp"  "stderr"  "/home/b4mbus/.local/share/nvim/lsp_servers/nimls.tmp/src/nimlsppkg/logger.nim(5) logger\n/home/b4mbus/.choosenim/toolchains/nim-1.6.2/lib/pure/logging.nim(572) newRollingFileLogger\n/home/b4mbus/.choosenim/toolchains/nim-1.6.2/lib/system/io.nim(745) open\nError: unhandled exception: cannot open: /tmp/nimlsp/nimlsp.log [IOError]\n"

@williamboman
Copy link
Owner

I think this might've been introduced in PMunch/nimlsp#111 or maybe PMunch/nimlsp#109.

It seems like installing an older version might fix it for now:

:LspInstall nimls@d94ad7f829cdc2457640aebdd07aae5297ff2e0e

@williamboman
Copy link
Owner

I'd actually suggest raising an issue with nimlsp directly! I don't believe there's anything wrong with how it's installed.

@Dich0tomy
Copy link
Author

Yes, installing the older version worked, thanks. I'll make an issue on nimlsp's repo. Thanks a lot.

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

No branches or pull requests

2 participants