Open jangler opened 7 months ago
Hey thanks for the feedback!
Janet++ began life in private as a personal fork of the "official" Janet VS Code extension. The "Evaluate expression" command isn't something I've ever paid close attention to, since from day one (i.e., the day I started using vscode-janet) that part has "worked ok," more-or-less. All three behaviors you describe come from the implementation of Evaluate expression in that original version. But, I think you're right on all three points—the current behavior is not ideal and should be improved.
In the mean time, there is a work-around for evaluating specific forms, including top-level ones that are not enclosed in parens/brackets, and that is to manually highlight/select the form that you want to eval before triggering the eval command. This should work both for nested sub-expressions and top-level ones outside of brackets, and with the select-by-S-expr behavior of Ctrl+Shift+<R/L Arrow> in Janet++, it hopefully isn't inordinately annoying.
But I will try to bring expression eval in Janet++ more into line with Calva, which will likely address all three of your points. For instance, in the future we will probably have two separate commands, one for eval'ing top-level forms and one for eval'ing current form/selection only.
Got it. Bringing it in line with Calva would be great. For now, knowing the workaround is helpful. Thanks!
Old and busted:
New hotness:
(Coming soon)
"Soon" turned out to be seven months later... But this is now shipped in v1.1.6 .
The "evaluate expression" command in Janet++ has a few peculiarities compared with pretty much every other evaluate-in-editor plugin I've used:
I'm using v1.1.1 pre-release. Thanks for this project; I was really pleased to see that someone was working on this sort of thing.