Skip to content

ark: Support indentation of vertically aligned arguments #574

@jmcphers

Description

@jmcphers

A common R code formatting convention is to vertically align function arguments. In RStudio, this behavior is called "Vertically align arguments in auto-indent" (Code -> Editing).

We should support this convention in Positron to make it easier for people to format their code nicely, and to make it easier to transition from RStudio.

Currently our auto-indent rules are declarative:

https://github.com/rstudio/positron/blob/main/extensions/positron-r/language-configuration.json#L37-L47

Note however that LSPs can supply as-you-type formatters, which might allow us to adopt more complex or contextual behavior.

https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#textDocument_onTypeFormatting

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions