Skip to content

atsyplenkov/formalist

Repository files navigation

Open VSX Downloads Deploy Extension GitHub License Project Status: WIP – Initial development is in progress, but there has not yet been a stable, usable release suitable for the public.

Formalist — Positron Extension

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.

Features

Note

All features work on selected text. If no text is selected, you'll receive a notification to make a selection first.

Make R Function Calls Explicit

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).

Fix Lints

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).

Installation

The extension is published on the Open VSX Registry: just click Install there or manually install it with:

  1. Start the Positron.

  2. 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.

  3. In the extensions view, simply search for the term Formalist in the marketplace search box, then select the extension named Formalist 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.

Dependencies

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.

Questions and Feature Requests

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

Contributions are welcome! If you'd like to contribute, please, fork, submit a PR and I'll merge it.

About

Positron extension to make R function calls explicit and fix lints on demand

Resources

License

Stars

Watchers

Forks

Sponsor this project