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)
.
Another key feature of Formalist
is its ability to detect and correct lints in your R code. The linting process is performed locally using the {flint}
package, which must be installed in your R environment.
Tip
The {flint}
R package installs in your current environment, so, you can setup your custom lint rules by running flint::setup_flint()
in your R console (read more here).
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 Extensions
command (click View -> 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
Formalist
in the marketplace search box, then select the extension namedFormalist
and 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 two R packages {pedant}
and {flint}
. If your current environment is lacking either of them, you will be prompted to install them.
There's a lot going on with the development of new features in Formalst
. If you have any questions or something is not working, feel free to open an issue or start a conversation on BlueSky.
Contributions are welcome! If you'd like to contribute, please, fork, submit a PR and I'll merge it.