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

Enhancements for WSL support #138

Merged
merged 4 commits into from
Mar 3, 2019
Merged

Enhancements for WSL support #138

merged 4 commits into from
Mar 3, 2019

Conversation

andresrgz
Copy link
Contributor

@andresrgz andresrgz commented Mar 3, 2019

This PR includes a fix for issue #132 and also installs the wsl-path library, this does depend on the wslpath binary, however that's already included with WSL.

Also, since this library was installed, it's now being used to convert the file path that is being sent to Joker. Here's the line of that change.

Finally, the configuration parameter useJokerOnWSL was renamed simply to useWSL, that way the user specifies if the linter and nREPL are both running through WSL.

A better solution could've been achieved by instead modifying cider-nrepl so that it can return valid Windows paths within WSL. But this is the best I could come up with without modifying the repl dependency. 😄

@PEZ You may also want to add the following to the wiki in order to describe how to use this extension with WSL:

Instructions for WSL

If you want to use this extension with WSL, there are a few things that need to be configured first.

  1. The useWSL option must be set to true and you must add a valid WSL path to the jokerPath option.
  2. After doing the previous step, you must restart Visual Studio Code.
  3. Make sure that you have Windows 10 version 1803 since that's the version that includes the wslpath tool which is used to convert between WSL and Windows paths.
  4. If you're using Leiningen and if you want to view definitions of source files (e.g. println, defn, def) you will need to change your .m2 directory to a location directly accessible by Windows. For example, you could edit your ~/.lein/profiles.clj like so:
{:user {:local-repo "/mnt/c/Users/<Your User>/.m2"}}

@PEZ
Copy link
Collaborator

PEZ commented Mar 3, 2019

Many thanks! Looking at it now and will get back to you.

@PEZ PEZ merged commit 61e6a0d into BetterThanTomorrow:master Mar 3, 2019
@PEZ
Copy link
Collaborator

PEZ commented Mar 3, 2019

Good call to hook the Joker setting on this as well.

The code changes look right, and well applied, to me. I am not on Windows so can't really test this, but I have built it and see that the setting is there. Can you test this VSIX package for me @andresrgz ? If it does the right thing for you, I'll release it.

clojure4vscode-1.3.64-WSL.zip

(You need to change the extension from .zip to .vsix in order to install it in VS Code.)

@andresrgz andresrgz deleted the wsl-enhancements branch March 3, 2019 20:28
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

Successfully merging this pull request may close these issues.

2 participants