Conversation
|
Hi @fprasx ! Currently, @Tim-ats-d is coming to the end of his internship working on a Merlin-based refactor engine, and he has an experiment that offers similar features (without preserving formatting, but I'm not sure that's particularly necessary). The advantage of his approach is that it relies on parsetree manipulation rather than strings, which, in my opinion, makes the feature a little more robust. Furthermore, we would like to preserve the fact that the features extend the Merlin protocol and that we use OCaml-lsp-server as an interface between Merlin and the various clients, greatly simplifying the maintenance of OCaml version upgrades. We can either share Merlin's experimental branch, which offers this feature, and try to pool the tests, while keeping the code action as the main interaction. We can also take care of the upstreaming on our side. What makes the most sense to you? |
|
Happy to contribute! I agree that using the parsetree to refactor seems more robust. Given my current development environment, I think it'll be pretty difficult for me to incorporate the new refactor engine. I think it's therefore best if y'all handle the upstreaming. Regardless, I'm happy to answer any questions and otherwise be helpful :) |
Adds a code action that takes type declarations and wraps them in a module that includes a type
t.