-
Notifications
You must be signed in to change notification settings - Fork 10
Indent breaks with completion using trimTrailingWhitespace #4
Comments
Just to add more info, if we do a space in the line it's also breaking the completion to remove the trailing space. Oh, I found the problem. It's was working before, so I think it a bug. |
Ok, I will check if I have the lates version of VSCode. Did you turn on |
No, I didn't try |
This is indeed a problem with Is there a way to distinguish completion-file-saving from normal file-saving and ignore the trailing for the former? This would also take care of actual trailing whitespace issues which I encountered in other editors before (see fdorg/flashdevelop#604). By the way, right now it won't even let me tab-indent, the tab is immediately deleted because the file is saved (for some reason... toplevel completion or something?). |
@Simn: Ah, yes, the file is saved prior to the completion call (related: HaxeFoundation/haxe#4651) -- I was just about to ask if there was any movement on that or the function signature / comma parsing (HaxeFoundation/haxe#4758) issues.
|
I can't figure out how to modify configuration. The type |
@simm File->Preferrences and you have two choices per workspace or more globally |
Yes I know how to do it manually. Jeff suggested changing the setting temporarily before saving the document and I don't know how to do that. |
I m working on a patch, changing before and restoring after didn't do anything |
I'm curious how you changed that because all I see on the configuration is |
yes... |
The vscode API indeed only has Of course, ideally we wouldn't have to save files as part of the completion flow. ;) |
Why have I never run into this? Are you guys setting this preference manually? |
Yes, I use it in every IDE/editor because you get stupid diffs otherwise. |
Got it. So perhaps we could implement an extension-level preference that does the same thing, but is aware of the completion auto-save issue. Perhaps with |
That what i was thinking until configuration can be writable... |
Maybe that's indeed necessary. However, it's still strange that VS Code removed all whitespaces on a line, not just trailing ones. Might be a bug on their end? |
There is another problem for now there is not a pre-event present before saving microsoft/vscode#239 |
Why do we need that? We manually call |
I just pull the latest version of vscode-haxe and it appear that autocompletion is breaking the current indentation when there is no dot in the line to autocomplete.
For example :
Become :
To reproduce this bug, you can simply try to press
enter
at the end of a line. Wait 1sec, and their you should see that your cursor has been moved to the beginning of the line.I am under linux.
The text was updated successfully, but these errors were encountered: