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

Re-enabled code action support through the experimental server #803

Merged
merged 1 commit into from
Jan 27, 2023

Conversation

scohen
Copy link
Contributor

@scohen scohen commented Jan 23, 2023

This was removed when we backed out the change that allowed code actions. Re-enabling them, but only if experimental support is on.

@scohen
Copy link
Contributor Author

scohen commented Jan 27, 2023

@lukaszsamson I've been using this branch, and the code actions work really, really well.

@scohen scohen merged commit 7ed5cdd into elixir-lsp:master Jan 27, 2023
@gmile
Copy link

gmile commented Feb 7, 2023

@scohen out of curiosity, how does one enables this feature? I understand I would need to checkout elixir-ls locally, would you be willing to share the steps you're taking to make your editor use the locally checked out elixir-ls?

(I'm using nvim, but even if the steps are related to VSCode - I think it would help me connect the dots and replicate it for nvim)

@scohen
Copy link
Contributor Author

scohen commented Feb 8, 2023

@gmile Glad you asked:
to build elixir LS with the experimental server, just compile it as follows:

MIX_ENV=prod ENABLE_EXPERIMENTAL_SERVER=true mix elixir_ls.release -o ~/bin/

That will output the language_server.sh / language_server.bat files in your home directory's bin subdirectory. Then it's just a matter of updating nvim's configuration to point to that path rather than wherever it resides currently.
Conversely, you could overwrite the current installation by specifying the current installation's directory in the -o option.

After that, you should magically have the code action for replacing unused variables with underscored versions.

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.

3 participants