Sticky Lines: Show all nested things, not just functions?
The Sticky Lines feature only picks up functions, and not nested data structures. It would be really helpful when using API frameworks like reitit to show the nesting inside of any collection (list or map).
Context
There is an official feature in JetBrains IDE called "Sticky Lines", configurable in Editor > General > Sticky Lines that can show up to 5 lines of nesting context to show the user whatever function or data structure the cursor is currently inside. There are two types of Sticky Lines that I'm calling "Arrow" and "Text".
Currently when using Cursive, the "Arrow" Sticky Line will show the control structure that you're inside.
Current behaviour
"Arrow" Sticky Line shows scraper.api > router:
"Arrow" Sticky Line unchanged, "Text" Sticky Lines show:
(def router
:handler (fn [req]
"Arrow Sticky Line shows control structure: scraper.api > router > fn > if-let doc:
Expected behaviour
It would be helpful if the "Text" Sticky LInes showed the nesting of the current data structure, so it would show exactly where you are inside of a list or a map.
That's an interesting idea, I'm not sure how well it would work in practice though. The issue is that in Clojure all the code is data structures, and Cursive would have to reliably figure out which parts were code forms, and which were data forms. This would probably work in common cases but I'd have to think through whether it's possible in the general case.
If Cursive can already Move (Forward Into|Backward Out of) Sexp, could that be used to find the current nested position?
One of the most difficult things about Clojure, for at least beginners, is figuring out where you are in the Symbolic Expression (Sexp / Sexpr), so I think this feature would help a lot.
It would also be great if the background text could change for the current Sexp, ensuring it's a different colour for the Vim Mode current line background colour. This would be a lighter-weight version of Sexp path to be shown in the Sticky LInes area.