Open wurli opened 2 months ago
This sounds good to me thanks! I'm happy to review a PR
Nice, thanks! Just putting one together now. I noticed that {prettycode} is required for syntax highlighting, but I think this can be removed in favour of cli::code_highlight()
(introduced in cli 3.1.0) since cli is already a dependency. Happy for me to make that change as part of the same PR?
Interesting, it seems to do the same except that cli adds hyperlinks to help files with hover on info. Yes that'd be great to do the switch, then no need to check if prettycode is installed as we now do. I would prefer this in a separate PR however if you don't mind. Add yourself to ctb too in the first PR.
Nice one, will do 👍
How would you feel about the idea of adding some console messages to
construct_clip()
? Currently there's nothing to signal to a user that anything about the global state has changed, which to me feels like a bit of a sharp edge.I'd suggest displaying the complete text of the copied code, e.g:
A more terse message might be something like
ℹ Added 4 lines to the clipboard
, but I think showing the full code is better.Here's why I think more messaging would be useful:
Since
construct_clip()
modifies the global state, it seems polite to notify the user. There's an interesting section about this in the WIP tidy design principles.Sometimes I iterate through calls to
construct()
/construct_clip()
a bit before I arrive at something I want to use. Iterating usingconstruct_clip()
is currently not much fun because you need to paste the results to see what they are, so IMO this would be a nice convenience feature.Happy to make a PR if you like this idea.
I'm really enjoying this package! Thanks for creating/maintaining it 😃