`languageserver.formatting_style` in VSCode settings (not only options in `.Rprofile`)
See original GitHub issueIs your feature request related to a problem? Please describe.
I encountered the same issue on Windows as described in REditorSupport/languageserver#503.
It is not that trivial to figure out in what directory the “languageserver” was started and put the formatter/.Rprofile
in the proper location.
Describe the solution you’d like
Is there a way to set this in vscode-r settings (i.e., “r.lsp.formatting_style”)? Maybe like for the knitr
command.
Issue Analytics
- State:
- Created a year ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
An implementation of the Language Server Protocol for R
The formatting style can be customized by specifying languageserver.formatting_style option which is supposed to be a function that accepts an options argument ...
Read more >An implementation of the Language Server Protocol for R
The language server uses styler to perform code formatting. It uses styler::tidyverse_style(indent_by = options$tabSize) as the default style where options is ...
Read more >How to modify the auto-formatting rule in vscode?
The way to customize the formatting style is to add the following code in your ~/.Rprofile : options(languageserver.formatting_style ...
Read more >An implementation of the Language Server Protocol for R
Server capabilities are defined in capabilities.R. Users could override the settings by specifiying languageserver.server_capabilities option in .Rprofile .
Read more >One month with R in VS Code - Schiff Consulting
This is not always straightforward as VS Code has a zillion settings and R in ... and some R packages to work, which...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
This is really hard to find but I believe it will be changed in R 4.2.0 to be released this month.
Wouldn’t
languageserver.formatting_style
be difficult to represent this in json (VSCode’s configuration file is json, just in case) since this is essentially R code? Instead, it seems to me that it would be better to change thestyler
’s settings so that they can be defined from the configuration file (r-lib/styler#319) and use those settings. In fact, linting bylanguageserver
uses thelintr
’s configuration file (.lintr
).My bad, the issue is from the
languageserver
repository REditorSupport/languageserver#503