Skip to content

Formatting HTML templates for Angular uses html parser instead of angular parser #250

Description

@Kezo

Do you want to request a feature or report a bug?
Report a bug

What is the current/expected behavior?
Setting g:prettier#config#parser to empty string should let prettier decide on the parser. Instead, when editing html files, the parser seems to always be set to html. This is a problem when editing Angular templates.

What version of vim-prettier are you using - (output of :PrettierVersion) ?
1.0.0-alpha

What version of prettier are you using - (output of :PrettierCliVersion) ?
2.0.5

What is your prettier executable path - (output of :PrettierCliPath) ?
Absolute path to the project's node_modules/.bin/prettier

Did this work in previous versions of vim-prettier and/or prettier ?
Haven't tested

I solved this locally by just removing lines 1-8 of ftplugin/html.vim, that for some reason sets the parser to html as soon as the file is an html file, seemingly disregarding the setting of g:prettier#config#parser. I am guessing those lines were there for a reason, however.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions