next-ls
next-ls copied to clipboard
workspace command: extract an expression to a variable
A workspace command that extracts an expression to a variable.
Example:
defmodule Example do
def run(argument) do
DoSomeOtherThing.run(String.split(argument, "\n"))
end
end
Hovering the String.split expression and running the workspace command should result in something like this:
defmodule Example do
def run(argument) do
var = String.split(argument, "\n")
DoSomeOtherThing.run(var)
end
end