clojureVSCode icon indicating copy to clipboard operation
clojureVSCode copied to clipboard

Configure nREPL with Linux subsytem on Windows 10

Open tjb opened this issue 5 years ago • 1 comments

How can nREPL be configured to access lein via the linux subsystem on a windows 10 machine? Currently I get the following error

'lein' is not recognized as an internal or external command,
operable program or batch file.

which I assume is because have lein installed on the subsystem. Is there a way to configure this to use lein from my subsystem?

Apologies if I am asking in the wrong place.

tjb avatar Mar 02 '19 04:03 tjb

Hello @tylerbobella,

Yes, the reason is most likely the lein command is not in your system PATH variable. I think the best way will be me adding an option to the extension that will allow a user to define the path to lein. Meanwhile, I can suggest the following workarounds:

  1. Add lein to the PATH variable (not sure it is possible because I have no experience with the Linux subsystem on the Windows platform).
  2. You can hardcode the path to lein in your clojureVSCode installation. The extension should be in the %USERPROFILE%\.vscode\extensions foder. Find the fild nreplController.js and the line nreplProcess = spawn('lein', LEIN_ARGS in it. There you can replace 'lein' with the full path to your Leiningen installation. Unfortunately, you will need to do it after each extension upgrade.

avli avatar Mar 08 '19 19:03 avli