Open rinkjames opened 3 days ago
Hi, I am not sure that's easily possible due to {rstudioapi} current functionality. Technically, I think we could expose multiple addins and allow the user to parametrise each of them with a style guide (instead of relying on the options). Or make the behaviour of the styling addin dependent on some environment / option value. But I consider that out of scope for {styler.}. Also, consider using {codegrip}.
Hi, not sure if this is possible. Sometimes I'd like to retain the (lack of) line breaks for certain lines of R code, because I think it's easier to read. I've learned how to set the style using
options(styler::tidyverse_style(scope = I(c('spaces','indention','tokens'))))
, but it would be great to have a dedicated keyboard shortcut for styling a selection of code with this specified style. Then I can use one shortcut for invoking style_selection with the default tidyverse style, and another keyboard shortcut for invoking style_selection with the no-breaks tidyverse style.Possible?