gpereira
RefactorEx - Effortless Elixir Refactoring in VS Code
Hello, Elixir enthusiasts! ![]()
I’m thrilled to introduce RefactorEx, a new Visual Studio Code extension designed to make refactoring your Elixir projects smoother and more efficient than ever.
What is RefactorEx?
RefactorEx simplifies your Elixir development by offering intuitive code actions for a wide range of refactorings. Whether you’re extracting functions, renaming variables, or tweaking pipelines, RefactorEx lets you refactor with confidence and speed—all without leaving your editor.
Check it out in action:

Key Features
Here are some of the many refactorings you can perform with RefactorEx:
- Functions: Extract, inline, rename, or even convert anonymous functions to regular ones.
- Variables & Constants: Extract, inline, or rename with ease.
- Aliases & Guards: Expand, merge, sort, or inline them.
- Pipelines: Introduce or remove pipes, and even add
IO.inspectfor debugging.
A complete list of available refactorings can be found in the documentation.
Why RefactorEx?
Refactoring is a core part of maintaining clean, readable, and maintainable code. RefactorEx began as part of my academic journey—specifically, my undergraduate thesis project (TCC), extending the research of my professor. My goal was to create something practical and valuable for the Elixir community, and I’m excited to share it with you now!
Get Started
- Install RefactorEx from the VS Code Marketplace.
- Open your Elixir project in VS Code.
- Highlight a code snippet or place your cursor where a refactoring is needed.
- Hit the lightbulb icon
or use the quick actions menu (Ctrl+.orCmd+.).
Feedback and Contributions
Your feedback is invaluable! If you have suggestions, encounter issues, or want to contribute, please head over to the GitHub repository.
RefactorEx is a work of love, and I’d love to hear your thoughts as we continue to improve and expand it. Let me know how it works for your projects or if there’s a refactoring you’d love to see implemented next!
Happy coding!
gp-pereira
Notes
- I know there is official LSP on its way and I’m already looking into how to merge these refactorings into it.
- Although it was developed for VS Code, I think it should be pretty straight forward to connect it to other editors since it’s a LSP.
Most Liked
mhanberg
zachdaniel
Woah! This is awesome! We’ve built some refactor tools into igniter, our generator and project patching tool, I’m wondering if there is an opportunity to collaborate here? There is a huge intersection in what the two libraries are doing, although ours works on a sort of “virtual” file system via rewrite. Igniter is also based on sourceror.
One of our goals with igniter is to make these accessible outside of the context of an editor, so that they can be scripted, shared and standardized.
dimitarvp
Last Post!
Kalamar
I managed to install it into Codium, downloading the extension file through undocumented urls, since it didn’t appear in the list of plugins.
Newbie question: how can I change the keyboard mappings? I don’t see anything related in the “Keyboard Shortcuts” window (granted, I haven’t used Codium for a long time)
Popular in Announcing
Other popular topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #elixirconf-us
- #advent-of-code
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #security
- #hex









