Fork me on GitHub

Any idea how to use vim's with Clojure's discard macro (`#_`) to shorten the presentation of discarded forms? Something along the lines of:

#_ (prn 1 2 3 4 5) => #_ (prn ...)
#_ [1 2 3 4 5] => #_ [1 2 ...]
#_ {:x 1 :y 2 :z 3} => #_ {:x ...}


is the current vim mode smart enough to recognize #_ followed by any form as a single syntactic unit?


I might be out of date but it doesn't look like it here


I don't know how all the stuff works. I played around with it a bit and couldn't quite get the desired result, but my guess is that it's possible. I think it can be done with just plain regex/match groups too. Not sure if such an implementation would be too rough around the edges.. I'm sure a language-aware option would be better.


my understanding is that conceal is tied to the syntax parsing, so in order to use it you'd need to modify the syntax definition, the hard part would be adding #_ properly to the syntax if it isn't there yet (the current font locking leads me to believe it isn't)


I don't think tree sitter is relevant to this tree-sitter is a parser, so it could help, but I suspect it isn't a straightforward solution


IIRC, since enabling tree-sitter syntax highlighting #_-forms (in their entirety) are automatically hightlighted as comments. Maybe you can hook that into conceal? 🤷

Braden Shepherdson22:12:22

kaocha prints nice colourized diffs to my terminal, but :Eval (kaocha.repl/run) with fireplace.vim prints in monochrome with lots of ugly escapes in. is there a way to get nicely colorized eval output in vim? (test results in a split window or something is acceptable)


I've tried a variety of plug-ins that interpret the ANSI escape codes into colored/bold/etc. text. The best one I've found is a recent one:

💯 1

Requires Neovim


in my experience that happens with neovim where it does not happen with vim


never looked into it, but would love to fix it