REditorSupport / languageserver

An implementation of the Language Server Protocol for R
Other
564 stars 91 forks source link

custom style guide in README #664

Open lorenzwalthert opened 3 months ago

lorenzwalthert commented 3 months ago

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 commented 2 months ago

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

Robinlovelace commented 2 months ago

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

Robinlovelace commented 2 months ago

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 ?