Jed

Results 232 comments of Jed

You might be waiting a couple years for vscode to fix it on their end. In the meantime, does my solution above solve your immediate needs?

@dietergeerts I never said you can't use a `,`. The issue is using the `{}` without _also_ using a `,`.

@dietergeerts your issue has nothing to do with this extension, specifically. In fact, it's not even related to [editorconfig-core-js](https://github.com/editorconfig/editorconfig-core-js). I'm not sure where you're getting the idea that this is...

I don't believe vscode is doing this on purpose. There are [three EditorConfig settings](https://github.com/editorconfig/editorconfig-vscode/blob/1e2e8373ee60ea57d27bf822aa6499e2b2e3ad0a/src/DocumentWatcher.ts#L34-L36) that execute on the [`workspace.onWillSaveTextDocument`](https://github.com/editorconfig/editorconfig-vscode/blob/1e2e8373ee60ea57d27bf822aa6499e2b2e3ad0a/src/DocumentWatcher.ts#L63) event. - `SetEndOfLine()` - `TrimTrailingWhitespace()` - `InsertFinalNewline()` They do their respective...

This extension doesn't do any fs path resolution, but it does use [`path.join`](https://github.com/editorconfig/editorconfig-vscode/blob/1e2e8373ee60ea57d27bf822aa6499e2b2e3ad0a/src/DocumentWatcher.ts#L104-L109).

Looks like it was fixed in https://github.com/microsoft/vscode/issues/18837

I have a feeling the EditorConfig core might need to be updated, but this extension will only have to update that dependency version. I'll leave this ticket open for now.

The only strategy I can think of is to save the file contents, let vscode do it's trimming and then manually untrim it after the fact, but I refuse to...

Good point. That feature didn't exist at the time of implementation.