expert icon indicating copy to clipboard operation
expert copied to clipboard

Not working in VSCode and similar (Windsurf, etc) on macOS

Open mkhennoussi opened this issue 5 months ago • 7 comments

Hi everyone !

First, I would like to thank you for the amazing work you are doing guys !

I've followed the instructions :

You can download Expert from the [releases page](https://github.com/elixir-lang/expert/releases) for your operating system
 and architecture. Put the executable somewhere on your $PATH, like ~/.local/bin/expert

and

To change to a local executable, go to Settings -> Extensions -> Lexical 
and type /my/home/projects/expert/apps/expert/burrito_out/expert_linux_amd64 into the
 text box in the Server: Release path override section.

but I can't get the extension working on VsCode (and Windsurf) on macOS.

For instance, formatting is not working even if I specify : "[elixir]": { "editor.defaultFormatter": "lexical-lsp.lexical" }

Any ideas ?

Thanks !

mkhennoussi avatar Aug 29 '25 06:08 mkhennoussi

Can you open the Output tab, select "Lexical" and share the logs from that screen? Thanks!

doorgan avatar Aug 29 '25 07:08 doorgan

Hey there 👋

I'm also having trouble getting expert working with the Lexical extension. I'm using VSCode on Ubuntu (WSL on Windows) and exhibiting some weird behavior. Sharing some details as I suspect the issue may be similar.

I start VSCode using the code shortcut from within an Ubuntu session.

When my mise.toml config looks as follows in the project directory (project directory is named "usher"):

[tools]
erlang = "27.3.2"
elixir = "1.18.3-otp-27"

Lexical output looks as follows:

2025-08-29 15:29:16.518 [info] Release override path set to "/home/tugayac/expert/apps/expert/burrito_out/expert_linux_amd64". Skipping auto-install.
2025-08-29 15:29:16.518 [info] Starting Lexical in directory /home/tugayac/typhoon_works/usher
2025-08-29 15:29:16.518 [info] Starting lexical release in "/home/tugayac/expert/apps/expert/burrito_out/expert_linux_amd64"
2025-08-29 15:29:24.208 [info] /home/tugayac/.local/share/mise/installs/elixir/1.18.3-otp-27/bin/elixir: 244: exec: erl: Permission denied

However, when I remove erlang from the mise config:

[tools]
elixir = "1.18.3-otp-27"

The Lexical extension seems to get further:

2025-08-29 15:38:29.355 [info] Release override path set to "/home/tugayac/expert/apps/expert/burrito_out/expert_linux_amd64". Skipping auto-install.
2025-08-29 15:38:29.355 [info] Starting Lexical in directory /home/tugayac/typhoon_works/usher
2025-08-29 15:38:29.355 [info] Starting lexical release in "/home/tugayac/expert/apps/expert/burrito_out/expert_linux_amd64"
2025-08-29 15:38:37.532 [info]     warning: redefining module Usher.MixProject (current version defined in memory)
    │
  1 │ defmodule Usher.MixProject do
    │ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    │
    └─ /home/tugayac/typhoon_works/usher/mix.exs:1: Usher.MixProject (module)

That being said, I can't jump to any definition, even though it seems like expert is able to compile my project: Image

Here are the logs as well, in case that helps: expert.log project.log

I have no idea why removing the erlang version from the project mise config works... My global mise config (at ~/.config/mise/config.toml) has the same erlang version. I'm thinking the "permission denied" error here is misleading and that for some reason, the erl executable can't be found. I couldn't find logs in VSCode or from the Lexical extension to know what environment variables are available to the lexical release (i.e. expert) when VSCode executes it.

Let me know if I can help with any additional info 🙏

tugayac avatar Aug 29 '25 07:08 tugayac

Can you open the Output tab, select "Lexical" and share the logs from that screen? Thanks!

025-08-29 08:51:15.811 [info] Release override path set to "~/.local/bin/expert". Skipping auto-install.
2025-08-29 08:51:15.811 [info] Starting Lexical in directory /Users/moh/Projects/MVPs/vehicule

mkhennoussi avatar Aug 29 '25 08:08 mkhennoussi

OS: Manjaro Editor: Cursor

I'm also getting that warning: redefining module error and "Go To Definition" just hangs. It's working in my neovim setup FWIW.

2025-08-29 14:13:01.483 [info] Release override path set to "/home/cleaver/.local/bin/expert". Skipping auto-install.
2025-08-29 14:13:01.483 [info] Starting Lexical in directory /home/cleaver/Documents/projects/punnles/punnles
2025-08-29 14:13:01.483 [info] Starting lexical release in "/home/cleaver/.local/bin/expert"
2025-08-29 14:13:16.666 [info]     warning: redefining module Punnles.MixProject (current version defined in memory)
    │
  1 │ defmodule Punnles.MixProject do
    │ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    │
    └─ /home/cleaver/Documents/projects/punnles/punnles/mix.exs:1: Punnles.MixProject (module)

cleaver avatar Aug 29 '25 18:08 cleaver

Are you still able to reproduce this issue? It seems related to #84 which seems resolved for me

doorgan avatar Oct 30 '25 15:10 doorgan

I'm still getting this same behavior.

MitchellJeppson avatar Oct 30 '25 17:10 MitchellJeppson

Seems to be working for me after following the installation instructions again 👍. No issues with jumping to module/function definitions anymore.

tugayac avatar Oct 31 '25 08:10 tugayac

FWIW I'm using VSCode and Cursor on MacOS with recent Expert version and I don't experience any of the issues above.

katafrakt avatar Dec 30 '25 15:12 katafrakt