Fork me on GitHub

I thought about a new feature, but not sure how helpful would be: It's pretty common to hover over a function usage that has no docstring (picture1), but I want to know how other places are calling it and what they are passing (picture2), usually i find the references of that function and check one or other usage, how useful would be to have on the hover doc something like Example usages on the project ? showing a line for each call, similar to how we show cljdocs for clojure core elements

😍 1
Noah Bogart13:08:53

That's a cool idea. Would you have a heuristic to choose a small-ish "normal" version? some of the calls in my codebase can span like 10 lines lol


yeah, we could limit to a number like 5 calls I guess and choose calls that are one line long or something, that's a good discussion indeed


Very cool! 😎


I wonder if one day it'll be possible to have user-defined refactorings similar to how there are user-defined snippets now... or if it's just too complicated of a task to expose as a user interface.


Yeah, if we think somehow on a config API that makes sense that would be possible, but IMO it should not be easy to find something that would work for most cases


Maybe there are some low hanging fruit - very simple transformations - that could be considered for a early experiments.


I understand that it would not be an easy thing to make work for all use cases. LSP is powerful and comes with the tools that allow for refactoring to happen, but I've read you mention that there is a constant need to have a balance between adding more refactoring capabilities and limiting the complexity of the code base. Judging by the number of posts in here and in the issue tracker, people are not going to run out of refactoring ideas anytime soon 🙂 so my random thought of the day is that the long term view for managing the complexity of the code base is to hand the variability off to the user while just providing the engine to support the transformation operations.


Yeah, that is a valid thought, if we could reach something generic enough that would suppress most user needs I completely agree, I just can't see clearly ATM how to do that 😅 I did for snippets because that was simple enough and would result and lots of customizations and it worked pretty well, but refractors are way more complex