Skip to content

How to keep = as the assignment symbol? #860

@ShixiangWang

Description

@ShixiangWang

Dear developers,

Thanks for developing this awesome tool. Sometimes I want to use a style that keep using = instead of <- of assignment symbol. Is there any easy way to do this? I check the functions but no options can be used for this setting like formatR.

BTW, the package languageserver provide a way to do this in VScode with:

options(languageserver.formatting_style = function(options) {
  style <- styler::tidyverse_style(indent_by = options$tabSize)
  style$token$force_assignment_op <- NULL # Not force modifying '=' to '<-'
  style
})

I don't know how to apply this for styler as no object can be assigned back.

Best,

Shixiang

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions