cursive icon indicating copy to clipboard operation
cursive copied to clipboard

File Structure support for EDN files

Open markaddleman opened this issue 2 years ago • 1 comments

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.

Screenshot 2022-06-03 9 43 22 AM

markaddleman avatar Jun 03 '22 14:06 markaddleman

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: image

onetom avatar Jun 07 '22 02:06 onetom

Hm, why only in EDN files?

serioga avatar Sep 25 '23 08:09 serioga

@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.

Screenshot 2023-09-25 at 22 36 26

cursive-ide avatar Sep 25 '23 09:09 cursive-ide

Well, it would be totally great to have structure support integrated with Navigation Bar as well, like in other languages.

2023-09-25_121500

serioga avatar Sep 25 '23 10:09 serioga

Also now I see an empty bar in clj files, in place of breadcrumbs...

serioga avatar Sep 25 '23 14:09 serioga

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).

cursive-ide avatar Sep 25 '23 21:09 cursive-ide

The next EAP has full support for breadcrumbs in Clojure (no empty bar), and also has nav bar support for Clojure code.

cursive-ide avatar Oct 20 '23 03:10 cursive-ide

Fix released in 1.13.1-eap5 on 2023-09-25.

cursive-ide avatar Oct 30 '23 02:10 cursive-ide

Fix released in 1.13.1 on 2023-12-07.

cursive-ide avatar Dec 07 '23 01:12 cursive-ide