Skip to content

fix default R file extension #11

Closed

Description

@ThomasSoeiro

VSCode recently fixed R file extension to defaults to .R rather than .r: microsoft/vscode#284740 and microsoft/vscode#289658

However this does not work when the vscode-R extension is loaded. This seems to be overwritten by

"extensions": [
".r",
".R",
".r",
".rhistory",
".rprofile",
".rt"
],

Activity

  1. ThomasSoeiro commented on Apr 1, 2026

    @ThomasSoeiro
    CollaboratorAuthor

    By the way, we should also get .Rd and .Rmd by default (though I guess its defined in vscode-R extension).

    Happy to provide the PRs if it helps!

  2. eitsupi commented on Sep 23, 2026

    @eitsupi
    Member

    Rather than changing the extension order here, should we remove the r language contribution from r-syntax entirely?
    VS Code already owns the r language definition, while this extension is intended to provide syntax definitions.

    Duplicating the language metadata is what causes the built-in .R preference to be overridden in the first place.

  3. randy3k commented on Sep 26, 2026

    @randy3k
    Member

    The vscode R definition is actually mirroring our definition.
    https://github.com/microsoft/vscode/blob/fb6287ccd71fc6974ed18d293f6eb7ebe555234d/extensions/r/package.json#L12

    They actually recommend people to file issues here .

  4. eitsupi commented on Sep 27, 2026

    @eitsupi
    Member

    @ThomasSoeiro Why did you reopen this?

  5. ThomasSoeiro commented on Sep 27, 2026

    @ThomasSoeiro
    CollaboratorAuthor

    It's a mistake (I tested and still got .r and .rmd. I just realized that we released vscode-R-syntax just before we merged your PR)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions