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

install nimlsp failed in MacOS #118

Closed
jayli opened this issue Feb 16, 2022 · 2 comments
Closed

install nimlsp failed in MacOS #118

jayli opened this issue Feb 16, 2022 · 2 comments

Comments

@jayli
Copy link

jayli commented Feb 16, 2022

~/ttt/nim/nimlsp (master*) » nim --version 
Nim Compiler Version 1.6.4 [MacOSX: amd64]
Compiled at 2022-02-16
Copyright (c) 2006-2021 by Andreas Rumpf
active boot switches: -d:release
~/ttt/nim/nimlsp (master*) » nimble --version   
nimble v0.13.1 compiled at 2022-02-16 11:50:10
git hash: couldn't determine git hash

I don't know why.

@jayli jayli changed the title install nimlsp failed install nimlsp failed in MacOS Feb 16, 2022
@PMunch
Copy link
Owner

PMunch commented Feb 16, 2022

Did you read the full section under "Installing NimLSP"? Quoting that section:

This will compile and install it in the nimble binary directory, which if you have set up nimble correctly it should be in your path. When compiling and using nimlsp it needs to have Nim's sources available in order to work. With Nim installed through choosenim these should already be on your system and nimlsp should be able to find and use them automatically. However if you have installed nimlsp in a different way you might run into issues where it can't find certain files during compilation/running. To fix this you need to grab a copy of Nim sources and then point nimlsp at them on compile-time by using -d:explicitSourcePath=PATH, where PATH is where you have your Nim sources. You can also pass them at run-time (if for example you're working with a custom copy of the stdlib by passing it as an argument to nimlsp. How exectly to do that will depend on the LSP client.

I'm guessing you have Nim installed via some kind of package manager, and therefore the sources for Nim aren't where NimLSP needs them to be. You can pass the sources explicitly or you can install Nim with choosenim (recommended anyways).

This is also probably a duplicate of #54

@jayli
Copy link
Author

jayli commented Feb 16, 2022

thank you!
it works!

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

No branches or pull requests

2 participants