Closed yummy-licorice closed 2 years ago
this is millions time duplicate. your distribution doesnt provide nimsuggest sources so you have to clone repo yourself and read build instructions https://github.com/PMunch/nimlsp#compile-nimlsp=
I am building from source
You need nim repo. Please, read linked instructions.
As the error you got suggest the file /usr/lib64/nim/nimsuggest/nimsuggest.nim
doesn't exist. This is because you have installed Nim either through your package manager or manually. NimLSP builds directly against Nim sources, and since most people have installed Nim through choosenim
or similar they will already have these sources available and placed relative to the Nim binary. If you don't have these sources available you need to download them, and in any case you need to use the -d:explicitSourcePath
when compiling, as described in the README.
The error I get:
/home/luke/tmp/nimlsp/src/nimlsppkg/suggestlib.nim(11, 8) template/generic instantiation of `mImport` from here /home/luke/tmp/nimlsp/src/nimlsppkg/suggestlib.nim(7, 14) Error: cannot open file: /usr/lib64/nim/nimsuggest/nimsuggest.nim Error: Build failed for package: nimlsp ... Execution failed with exit code 1 ... Command: /usr/lib64/nim/bin/nim c --colors:on --noNimblePath -d:NimblePkgVersion=0.4.0 --path:/home/luke/.nimble/pkgs/jsonschema-0.2.1 --path:/home/luke/.nimble/pkgs/ast_pattern_matching-1.0.0 -o:/home/luke/tmp/nimlsp/nimlsp /home/luke/tmp/nimlsp/src/nimlsp.nim