Open gtdrakeley opened 2 years ago
Investigated a bit further and it would probably be sufficient to:
nimble list --installed
to get a list of installed packagesnimble path <pkg>
to get their path--path:<path>
option to the call to nim check
or any other tools that need to know the location of installed packagesCould you achieve the same thing with a cfg file? The extension uses nimsuggest, which is essentially the compiler. If anything Nimble should generate a workable cfg.
Nimble and I aren't friends; I tried to deeply incorporate it in the past. You've got an overall approach, if you can make a clean addition I'll accept the PR. Sorry, I can't even begin to imagine spending any more of my time on that thing.
You can add --NimblePath: "./nimbledeps/pkgs"
for Nim 1 and --NimblePath: "./nimbledeps/pkgs2"
for Nim 2 to nim.cfg
. This enables linting for locally installed dependencies.
If you are using nimble with the
--localdeps
flag to keep dependencies local to a project they are not included when linting the files.As a result
nimble build
will function as expected but you will have import errors in any source file using installed dependencies.