Skip to content

Stop blowing away the BufWritePre augroup in ftplugins#272

Merged
mitermayer merged 1 commit intoprettier:masterfrom
johanventer:fix-autoformat
Feb 1, 2021
Merged

Stop blowing away the BufWritePre augroup in ftplugins#272
mitermayer merged 1 commit intoprettier:masterfrom
johanventer:fix-autoformat

Conversation

@johanventer
Copy link
Copy Markdown

Summary

The BufWritePre autocmds are reset each time a file type plugin is run, which means if you open a file of one type, it will auto format correctly, but if you then open a file of a different type, the original file will no longer auto format.

See further explanation here: #185 (comment)

This PR removes the augroup from each of the ftplugin files and adds some missing file extensions to the augroup in plugin/prettier.vim.

Test Plan

[...]

@gadkadosh
Copy link
Copy Markdown

Didn't see this PR... I can confirm that a similar change was required for me to have vim-prettier auto format consistently and not break its own autocmds.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants