nvim-metals
nvim-metals copied to clipboard
Display decoded definitions form same file in different buffers
Current behavior
Showing javap/tasty/semanticdb representations of definitions is a great feature ❤️ In case there are multiple trait/class/object definitions in the same file, a popup asks for a choice of a single definition to decode. Then decoding result is displayed in a separate buffer named "%filename%.scala decoded *%format% viewer". The buffer is reused when decoding other definitions from that file.
Proposal
I'm not sure if reusing the buffer is a convenient default behavior, since it makes impossible showing same-type decodings (e.g. javap) for multiple definitions from the same file at the same time. Also, it might be useful to put definition names into the buffer name, e.g "%filename%.scala/%classname% decoded %format% viewer"
Hey @susliko, good point. I haven't revisited this since I first implemented it. My original thought process was to try and make sure there wasn't a bunch of random leftover buffers for decoded classes etc, but I was probably overzealous with my worry.
Also, it might be useful to put definition names into the buffer name, e.g "%filename%.scala/%classname% decoded %format% viewer"
Yea, I think this is a totally fine idea.