ruby-lsp
ruby-lsp copied to clipboard
Explore adding meta-programming previews
It would help developers to better visualize meta-programming, if we could somehow provide a preview of what the result is going to be. Something like
class Foo
["bar", "baz", "bat"]. each do |name|
# Meta-programming preview
# def name
# process(name).to_sym
# end
define_method(name) { process(name).to_sym }
end
def process(string)
# ...
end
end
This could either be a part of inlay hints or a custom request, depending on how the visualization happens.