Open george-grec opened 3 weeks ago
Great idea!! thank you
I'd love to start hacking on this. Where can I find the LSP code? Still familiarising myself with the codebase.
Do we want to allow this just for record constructors or for all kind of functions? I think making it easier to use functions unqualified would be a net loss given we want to encourage the opposite style
Unqualify: types, record constructors qualify: everything
Sounds great to me!
I'd love to start hacking on this. Where can I find the LSP code? Still familiarising myself with the codebase.
Hi @AcnoSaga, are you still looking into this? if not, I would like to give it a shot!
Currently, when you take a suggested auto import from the LSP for a type like here:
and select the
Some
variant from thegleam/option
module you get the following code:In many cases, you actually want to use an unqualified import for a type or variant because you (plan to) use it heavily, e.g. Option, Some, None, lustre elements, Dynamic. To do that right now you have to go to the top of the file and find your way back to where you were. This breaks your developer flow so it would be great if there was a code action when hovering the type or variant to change the import to an unqualified one or vice versa.