Fork me on GitHub
#conjure
<
2021-05-22
>
Olical12:05:04

I've also added some sort of support for https://github.com/Olical/conjure/issues/132 so now you can specify Lua pattern substitutions to be applied to your code before it's evaluated, this includes transforming comment blocks into (do ...) so you can evaluate comments from Conjure as if they weren't actually comments. (only applies to evals on the actual form, not the entire buffer, although that's also possible!)

viml
let g:conjure#eval#gsubs = {'do-comment': ['^%(comment[%s%c]', '(do ']}

❤️ 3
Olical12:05:19

This idea doesn't match the feature request perfectly but that's prohibitorily difficult until I have tree-sitter generally supported. I'd need to parse the code for the "smart" behaviour and I'm not going to go down that road with TS just around the corner (🤞)

Olical12:05:54

Let me know if you come up with novel use cases for this pre-eval substitution! It's like a Conjure specific macro... although at the string level so not quite as elegant and powerful...