Closed kwsp closed 1 year ago
This is likely happening because Nim was installed via a package manager which does not include the Nim source code. The source is required for NimLSP to build.
Solution (for me) was to install Nim using choosenim, which will keep the sources on-disk for NimLSP to find.
See also:
Thanks @jvinet! I personally don't do Nim development so I'm afraid I'm a bit lost. I can install nimlsp
via Mason just fine on 3 different Macs. My experience so far with nim has been that choosenim
is essentially a must for building nim packages, as it provides some essentials.
This fixes the problem! I originally installed nim
with brew
without choosenim
. After uninstalling the nim
from brew
and installing choosenim
, I was able to install nimlsp
successfully.
I think this should be documented somewhere - that nimlsp
won't install if you don't have choosenim
available. Maybe in the README of https://github.com/williamboman/mason-lspconfig.nvim#available-lsp-servers?
I faced the same problem. Because I was installed nim by pacman on Archlinux, Like sudo pacman -S nim
. So, My problem was fixed by reinstall with curl https://nim-lang.org/choosenim/init.sh -sSf | sh
. This page was helpful for me. Thank you😄.
I've searched open issues for similar requests
Yes
I've recently downloaded the latest plugin version of mason.nvim
Problem description
Trying to install
nimlsp
fails.The error message is a bit cryptic and its hard to debug off of the error message.
Expected behavior
nimlsp
should install successfully, as I have all the tools required to compile nim code installed.Affected packages
nimlsp
Mason output
Installation log
Neovim version (>= 0.7)
NVIM v0.8.1 Build type: Release LuaJIT 2.1.0-beta3 Compiled by brew@HMBRW-A-001-M1-004.local
Operating system/version
Darwin Silvie-2.local 21.5.0 Darwin Kernel Version 21.5.0: Tue Apr 26 21:08:29 PDT 2022; root:xnu-8020.121.3~4/RELEASE_ARM64_T8101 arm64
Healthcheck
Screenshots
No response