cursive
cursive copied to clipboard
File Structure support for EDN files
In reference to https://clojurians.slack.com/archives/C0744GXCJ/p1654265565732809
My specific use case is deps.edn . I'd like to open the file structure browser, type in a few characters of a dependency to jump to that point in the file. I believe IntelliJ's has file structure support for JSON files and I imagine EDN support would be very similar.
Interesting idea... I've tried jet -p -o json < deps.edn > deps.json
and here is how it would look like, with the source popup (Opt-Space) on its right, as a content preview for the selected subtree:
Hm, why only in EDN files?
@serioga Because there's already structure support in Clojure files. I've only added breadcrumb support for EDN files for the moment since it's easier, but I'll add it for Clojure shortly.
Well, it would be totally great to have structure support integrated with Navigation Bar as well, like in other languages.
Also now I see an empty bar in clj files, in place of breadcrumbs...
Yes, my plan is to integrate the nav bar support in the next EAP. Once that is in, I will probably disable the breadcrumb support by default, but you'll be able to switch it on in the settings. This is how Java and Kotlin currently work.
The empty bar is unfortunate, but that's just because I haven't implemented the breadcrumbs for CLJ yet, only for EDN. I can't turn it on for one and off for the other, because IntelliJ considers them the same language. Once I have both implemented that will show the breadcrumbs (assuming you have them enabled).
The next EAP has full support for breadcrumbs in Clojure (no empty bar), and also has nav bar support for Clojure code.
Fix released in 1.13.1-eap5 on 2023-09-25.
Fix released in 1.13.1 on 2023-12-07.