languageserver icon indicating copy to clipboard operation
languageserver copied to clipboard

custom style guide in README

Open lorenzwalthert opened this issue 1 year ago • 3 comments

In your README, you have a detailed recommendation for how to not replace = with <- that I realise is only partly correct. It may fail when the {styler} cache is active and transformer dropping is not properly implemented. To my knowledge, a better implementation can be found in the R Polars Project posted here. I am not sure what to do about this but I wanted to bring it to your awareness that the suggested approach may be not working correctly.

Once working correctly (currently not), you could also use https://github.com/Robinlovelace/styler.equals.

lorenzwalthert avatar Apr 05 '24 16:04 lorenzwalthert

{styler.equals} seems to be a good choice now, maybe once it's on CRAN, we can update the docs here. cc: @Robinlovelace

lorenzwalthert avatar Apr 29 '24 15:04 lorenzwalthert

OK awesome, happy to contribute, would that be useful? Thanks so much for all recent activity on this Lorenz!

Robinlovelace avatar Apr 29 '24 16:04 Robinlovelace

Follow-up question: I've had a read of this part of the README and have added a .Rprofile to a project as per commit above.

However, VS Code still highlights = as being typos:

image

Am I missing something? And is it possible to set the linting rules to come from {styler.equals} in the .lintr file, e.g. https://github.com/REditorSupport/languageserver/blob/master/.lintr ?

Robinlovelace avatar Apr 29 '24 18:04 Robinlovelace