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

Tee
can someone please explain to me how Enum.reduce works with maps
New
LegitStack
I’m hoping you guys can give me some general advice and perhaps code examples if you’re feeling up to it. I’m very interested in Elixir,...
New
openscript
Hello! Sorry for this astonishing simple question, but I’m really stuck. I try to set up the intellij-elixir plugin, but I don’t know ho...
New
joaquinalcerro
Hi there, I am working with Ecto-Postgresql and I need to call all of the records from a specific table but the table has 40,000 record...
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
_russellb
I want to try my hand at web scraping. What tools/libraries do I need to use. I’m hoping to turn this into something professional so don’...
New
Kagamiiiii
Student & New to elixir. Nice language. I want to convert a english character, e.g. “a”, which is stored in a variable, to it’s asci...
New
myronmarston
The Elixir Typespec docs show the following syntax for keyword lists in typespecs: # ... | [key: type] # keyword lis...
New
Exadra37
Sometimes I want to check if the input into a function is not a blank string. My first approach: defmodule Example do def do_stuff(s...
New
Mooodi
Given a string, how can I get access to its character by index? Enum.at("my_string", 2) doesn't work. Or rather, not char, but a substr...
New

Other popular topics Top

sorentwo
Hello! tl;dr Announcing Oban, an Ecto based job processing library with a focus on reliability and historical observability. After spen...
977 41022 311
New
sergio
I couldn’t find any guides that worked well with Phoenix 1.6.0 and esbuild. I hope this helps people test the waters and eases you into t...
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
fireproofsocks
I’m working on defining a simple Ecto schema for a table (in PostGres), but I don’t see where I can define a column as NOT NULL. Conside...
New
polypush135
As many of you may have realized by now (sorry for all the posts here) I’ve been working on a db problem where I’m trying to aggregate a ...
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
vonH
When I run the Plug and I recompile I wind up having to use Ctrl C to quit iex and start again. Witht the help of rlwrap I can use the cu...
New
WestKeys
Currently suffering from paralysis by [HTTP client] analysis. This is rather unusual in Elixirland as there tends to be consensus on the ...
New
romenigld
I am trying to run a deploy with docker and I successfully runned with this command: docker build -t romenigld/blog-prod . but when I t...
New
aesmail
Hello guys, I have finally made it. I created an admin interface for a framework. It’s been on my todo list for years and with the curre...
New

We're in Beta

About us Mission Statement