Skip to content

Format selection does not consider dprint a valid formatter #60

Open
@GNRSN

Description

@GNRSN

Hi, just started exploring dprint and tried this extension, formatting the document works fine but when I try to format a selection VScode complains about dprint not being a valid formatter for [current file type].

I could not understand if this was a limitation with the extension(/dprint) or a bug?

Minimal repro:

  • Create a new folder
  • Init dprint with default settings
  • add newlines at top of dprint.json
  • > Format document works as exepcted
  • highlighting the newlines and selecting > Format selection (cmd+k cmd+f) throws in VScode with error:

"Extension 'Dprint Code Formatter' is configured as formatter but it cannot format 'JSON'-files"

My setup:
dprint: 0.37.1 (homebrew install)
VScode: 1.79.0
dprint.dprint extension: v0.14.0

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