Open addshore opened 3 years ago
This is actually (or should be) a feature of VSCode itself. Extensions like PHPTools just use settings that VSCode tells it to use, and how the editor is currently behaving when you press tab
or so.
I believe there is an extension that overwrites editor settings based on .editorconfig
(https://marketplace.visualstudio.com/items?itemName=EditorConfig.EditorConfig ?)
I think we could process .editorconfig
by ourselves and ignore the VSCode settings, but it wouldn't be consistent with what you get when typing in the editor window.
but it wouldn't be consistent with what you get when typing in the editor window.
Seemingly when using a .editorconfig plugin the editor window behaves and respects the .editorconfig, however seemingly the values that phptools is getting (directly from the IDE) don't reflect the .editorconfig? But the editor behaviour is consistent with the .editorconfig settings.
Then phptools changes the behaviour of the editor window (incorrectly).
This is the one that I use:
Name: EditorConfig for VS Code
Id: editorconfig.editorconfig
Description: EditorConfig Support for Visual Studio Code
Version: 0.16.4
Publisher: EditorConfig
VS Marketplace Link: https://marketplace.visualstudio.com/items?itemName=EditorConfig.EditorConfig
Ok, code formatting should respect the values used in the editor's code window. We'll take a look at it.
Split out from https://github.com/DEVSENSE/phptools-docs/issues/101
One thing I noticed here is that this ignored .editorconfig files. Thus i had to turn off the phptools code style stuff fro this. The IDE would use tabs for example per .editorconfig, but then on line save phptools would replace the tabs with spaces.
This can also be defined in .editorconfig files
Another thing to note is there are other plugins to manage code in relation to these .editorconfig files But phptools seems to conflict with that.