Important
The extension is designed to work ONLY in
Positron IDE starting from version 2025.01.0, as it heavily depends
on the Positron API.
Note
All features work on selected text. If no text is selected, you'll receive a notification to make a selection first.
Formalist can make R function calls explicit, instead of implicit ones, using the {pedant} R package. In other words, it checks the currently attached packages, i.e., the ones already loaded using library(), and transforms R function calls like select(mtcars, mpg, cyl) into dplyr::select(mtcars, mpg, cyl).
Warning
Deprecated: The Fix All Lints feature is deprecated as of v0.3.0 and will be removed in v0.4.0.
The underlying R package flir is no longer actively maintained. We recommend migrating to
jarl, a next-generation R linter written in Rust.
Learn more at: https://github.com/etiennebacher/jarl
You can configure Formalist via the Positron settings (search for @ext:atsyplenkov.formalist in Settings).
Controls whether Formalist commands appear in the editor's right-click context menu.
A list of R package names that pedant will skip when making function calls explicit. Useful for packages you always attach and don't want to qualify. For example, adding dplyr means select(mtcars, mpg) stays as-is instead of becoming dplyr::select(mtcars, mpg).
A list of R function names that pedant will leave unchanged, regardless of which package exports them. Useful for specific functions you want to keep implicit even if their package is being made explicit. For example, adding plot prevents it from being rewritten as sf::plot(...) or sp::plot(...), or terra::plot(...). You got it :)
The extension is published on the Open VSX Registry: just click Install there or manually install it with:
-
Start the Positron.
-
Inside Positron, go to the extensions view either by executing the
View: Show Extensionscommand (clickView->Command Palette...) or by clicking on the extension icon on the left side of the Positron window. -
In the extensions view, simply search for the term
Formalistin the marketplace search box, then select the extension namedFormalistand click the install button.
Alternatively, you can install the latest version from the Releases page. Download the latest .vsix file and install it as described here.
Formalist depends on the R package {pedant} for making function calls explicit.
Warning
Support for the {flir} linting feature has been deprecated.
The {flir} package is no longer actively maintained. Please use {jarl}
for linting instead — a next-generation R linter written in Rust.
If {flir} is missing, you will still be prompted to install it until the feature is removed in v0.4.0.
There's a lot going on with the development of new features in Formalist. If you have any questions or something is not working, feel free to open an issue or start a conversation on Mastodon.
Contributions are welcome! If you'd like to contribute, please, fork, submit a PR and I'll merge it.

