-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compatibility with Prettier #7
Comments
Ok, i understand. |
With this config on reformat code and/or file save, the Prettier runs, and then the final new line is removed: {
. . .
"files.insertFinalNewline": false,
"files.removeFinalNewlines": true,
"files.trimFinalNewlines": false,
"files.trimTrailingWhitespace": true,
. . .
"[javascript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.tabSize": 2
},
"[json]": {
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.tabSize": 2
},
"[markdown]": {
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.tabSize": 4,
"editor.wordWrap": "off",
"files.insertFinalNewline": true,
"files.removeFinalNewlines": false,
"files.trimFinalNewlines": true,
"files.trimTrailingWhitespace": false
},
. . .
} |
@DoCode Thanks for looking into it! I just gave that a go and it did not work for me. I added the file-specific config that you listed but that didn't change anything for me since prettier was already set as the global editor default. "editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnPaste": false,
"editor.formatOnSave": true,
"editor.formatOnType": false,
"files.insertFinalNewline": false,
"files.removeFinalNewlines": true,
"files.trimFinalNewlines": false,
"files.trimTrailingWhitespace": true, Prettier Info: |
I Downloaded this with the hopes that this would work in conjunction with Prettier to remove the final newlines that it adds. There is no configuration for Prettier to disable the newlines, so I figured this may be an easy route through an extension.
Are you aware of any ability to specify the priority for the order of extensions during a save? Right now, Remove Final Newlines runs followed by Prettier.
The text was updated successfully, but these errors were encountered: