frigidcode

frigidcode

VSCode - Elixir LS + WSL

Has anyone had any luck using VSCode (win 10) and WSL (asdf elixir/erlang) with Elixir LS? I’m not even sure its possible, I am curious to if it will work and if anyone has it working then what is involved?

VSCode will run in Windows 10
Projects + Elixir + Erlang would run via WSL
ElixirLS would need its language server to run in WSL and communicate with VSCode in Windows 10.

Most Liked

olivermt

olivermt

The real answer here is to run X on windows and run vscode from inside wsl :slight_smile:

I went from 8 years on osx to ragequitting in disgust after fighting brew for a whole day.

Spent half a year using plain windows, was not happy. Wsl came out and I was more happy, but since my editor ran in windows it kept screwing up locks and whatnot. It even corrupted my git making me lose my work a few times.

Spent half a year on ubuntu, disgusted with how bad linux is for desktop usage i went back to wsl again, this time running Mobaxterm.

It works sooooo well. The vscode and gitkraken windows run from wsl and show up as native apps in win10. All the awesomeness of a «real» desktop environment with proper drivers, wifi not dying after closing laptop lid etc while also having a proper nix env to do my work in.

I’m very happy with this, even more so than the «golden years» before osx started to decline in quality.

NobbZ

NobbZ

This would go against all I have been told and taught about WSL: Don’t mix and match access through WSL and native Windows to the same resource.

This were a bit like running the LS on a remote computer, which is currently not possible as far as I know.


At my working place I tried WSL a bit and ran into nothing but trouble, setting up a Ubuntu VM was straight forward and “just works”.

cnck1387

cnck1387

I use WSL full time and VSCode (installed on Windows).

However, I also run my web apps in Docker so I don’t have to worry about installing things directly inside of WSL’s filesystem. At some point in the future VSCode is going to support seamlessly finding interpreter and library code running in a container instead of the local machine, so if you happen to use Docker, you’ll get the best of both worlds.

For the time being, I don’t even use extensions like Elixir-LS. I just installed vscode-elixir to get syntax highlighting.

Overall I’m super happy with the set up. I never liked heavy auto-complete because I find it creates micro-stutters and 95% of the time it gets in the way. My philosophy has always been to use snippets (works just fine with WSL) to help deal with code complete / boilerplate.

Where Next?

Popular in Questions Top

9mm
I am constructing a JSON object (map) and I need to conditionally set a field. I’m trying to write proper elixir-way code… and I’m at a l...
New
qwerescape
Is there a way to get the call stack or stack trace at any point in the code? Not from exceptions, but an expression that returns how the...
New
albydarned
Hello all! I am typing this post from my new MacBook Pro with the M1 chip. I’m loving it so far, and will probably use it as my daily dr...
New
earth10
Hi, I’m just starting to build a side-project with Elixir and Phoenix and doing some basic test with Elixir alone. What strikes me is th...
New
chrisalley
ExUnit now has describe blocks which is a welcome addition coming from RSpec. In the docs, it states that nested hierarchies of describe ...
New
lessless
I believe there are people here who are dealing with CSV files import on the daily basis, and since Excel is a really popular tool there ...
New
JeremM34
Hello, how can I check the Phoenix version ? Thanks !
New
vegabook
I'm brand new to Phoenix and I have stripped one of the demo applications to the bone. I just want to get an svg up on the screen. Here i...
New
ashish173
I am using Ecto timestamps with postgres, I can see the timestamps() use the :naive_dateime but for my use case I wanted to store the ti...
New
sergio_101
I am VERY much an elixir newbie. I have taken one elixir course and one phoenix course on Udemy. During that course, I saw the instructor...
New

Other popular topics Top

marius95
Hello everyone, I try to use an Javascript Event Handler in my root.html.leex file. Therefore I created a function in the app.js file: ...
New
aadeshere1
I have a another noob question about loop. Since elixir is immutable, while loop is not directly possible. total = 10 while total != 0 ...
New
Darmani72
If I have a post route which an argument: post /my_post_route/:my_param1, MyController.my_post_handler How would get the post params ...
New
TunkShif
This post is an instruction guide to help you setup your Neovim for Elixir development from scratch. It includes general information on h...
274 41454 115
New
chrismccord
Phoenix 1.4.0 released Phoenix 1.4 is out! This release ships with exciting new features, most notably with HTTP2 support, improved deve...
688 30840 112
New
joeerl
Hello again - after a longish gap I’ve decided I really must dig into Elixir and see what’s been happening here - so I have a few questio...
New
chrismccord
This release brings a number of exciting features, including integration with the new Phoenix LiveDashboard and Phoenix LiveView. There h...
New
Qqwy
Original source of discussion: This topic on the Pragmatic Programmers' Functional Web Development with Elixir, OTP, and Phoenix forum. ...
New
jason.o
In the code below, if the create action is not set to accept “extra_key” as an input, it errors out with a message shown above. Is there ...
New
sergio_101
I am VERY much an elixir newbie. I have taken one elixir course and one phoenix course on Udemy. During that course, I saw the instructor...
New

We're in Beta

About us Mission Statement