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

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
vertexbuffer
Hello, can anybody help here..? I have a list of players and I what to delete an element, but every for loop the list is reverting to ori...
New
senggen
Erlang/OTP 25 [erts-13.2.2] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] 15:22:35.803 [error] gen_event {lager_file_backend...
New
gshaw
What is the idiomatic way of matching for not nil in Elixir? E.g., First way: defp halt_if_not_signed_in(conn, signed_in_account) when...
New
mgjohns61585
Could someone help me? I’m making my first elixir program, number guessing game. I can’t figure out how to convert the user’s guess from ...
New
vac
Hi, I’m quite new in Elixir and I’m trying to format a string to a PEM format. I have the certificate value like MIIDBTCCAe2...... and I...
New
dokuzbir
I want to highlight html closing tags when i click a html tag. That works in .html files but doesnt work for html.eex templates. How can...
New
lucidguppy
I have a super simple question about elixir - how would I take a file like this foo bar baz and output a new file that enumerates th...
New
srinivasu
How to handle excepions in elixir? Suppose i have A, B, C ,D, E modules. and each module has get() function. A.get() method will call t...
New
chensan
I have a User schema with a :from_id field set to type :string: defmodule TweetBot.Repo.Migrations.CreateUsers do use Ecto.Migration ...
New

Other popular topics Top

vertexbuffer
Hello, can anybody help here..? I have a list of players and I what to delete an element, but every for loop the list is reverting to ori...
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
New
chrismccord
As promised, the first release candidate of Phoenix 1.3.0 is out! This release focuses on code generators with improved project structure...
New
Nvim
Anybody knows a comprehensive comparison of Django and Phoenix, thanks for the help. Where are they similar? Where do they differ the m...
New
hariharasudhan94
lets say i have a sample like a = 20; b = 10; if (a > b) do {:ok, "a"} end if (a < b) do {:ok, b} end if (a == b) do {:ok, "equa...
New
dokuzbir
I want to highlight html closing tags when i click a html tag. That works in .html files but doesnt work for html.eex templates. How can...
New
PeterCarter
There are pre-rolled solutions for other frameworks that do work. However, Phoenix does not seem to have these. Have people had good expe...
New
svb
Hi! Currently I want to submit a form by pressing the Enter key. However, since my input field is of type “textarea” this is just adds a...
New
lanycrost
Hi everyone! I need implement if…else if…else condition from my elixir code, and anymore of this control flow structures not work proper...
New

We're in Beta

About us Mission Statement