You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Any plans for an edit_positron_settings() function for examining/editing Positron's settings.json? #2111
Hello! usethis is a great package! Functions like edit_r_profile() are wonderful, both for advanced users and for new students.
Are there any plans to add a function like edit_positron_settings() for examining/editing the settings.json file which controls Positron? I (and my students) would definitely use this, if it were available.
The new use_air() function (#2109) crosses this Rubicon, so yes I can imagine this happening. But that PR also surfaced a pretty big problem which is that jsonlite is currently not set up to help edit JSONC:
Another feature of real .vscode/settings.json files that is at least tolerated by VS Code and Positron is trailing commas. So that is another thing that would be appealing in a very lenient JSON parser, in addition to comment support.
I'm talking about the comma after "Posit.air-vscode" here:
I think I would also want Positron itself to report the location of the targetted settings file versus (trying) to replicate the logic here in usethis, for all OSes, server vs. desktop, etc etc. So that means we'd need to expose something in the Positron API.
Activity
jennybc commentedon Mar 11, 2025
The new
use_air()function (#2109) crosses this Rubicon, so yes I can imagine this happening. But that PR also surfaced a pretty big problem which is that jsonlite is currently not set up to help edit JSONC:#2109 (comment)
I don't think we can really dig in to editing this file without such a capability.
jeroen/jsonlite#394
jennybc commentedon Jul 9, 2025
Another feature of real
.vscode/settings.jsonfiles that is at least tolerated by VS Code and Positron is trailing commas. So that is another thing that would be appealing in a very lenient JSON parser, in addition to comment support.I'm talking about the comma after "Posit.air-vscode" here:
{ "[r]": { "editor.formatOnSave": true, "editor.defaultFormatter": "Posit.air-vscode", }, "[quarto]": { "editor.formatOnSave": true, "editor.defaultFormatter": "quarto.quarto" } }I had the above (by accident, actually) and saw this when playing around with
use_air():It's not a great error.
jennybc commentedon Jul 23, 2025
I think I would also want Positron itself to report the location of the targetted settings file versus (trying) to replicate the logic here in usethis, for all OSes, server vs. desktop, etc etc. So that means we'd need to expose something in the Positron API.