Closed deathaxe closed 7 years ago
Do syntax tests even work properly with tabs? Iirc there were some oddities involved that basically require you to use spaces.
Tabs in syntax tests make no sense as all the rules would work with a single tab_width, only. So maybe it is a good idea to provide a syntax_specific_settings file to automatically switch to "indent with spaces"? Just for convenience.
We cannot provide a syntax-specific settings file because we don't know what syntax you are using it with. It could be any. We could override the view-specific setting to indent with spaces on_load, but I don't really want to do that, since I believe it's the user's responsibility to ensure that their tests are working properly. At least not for now.
What we could do is issue a warning somewhere, when we detect that a syntax test file is using tabs for indentation, I guess, and disable our hinting feature and others.
disable our hinting feature.
It was actually the one which told me something is wrong. :-)
Hello guys,
I just started a new syntax_test_dtd.dtd file.
The highlighted region does obviously not match the current scope.
The reason for this offset is TAB indention (
"tab_width": 2
) which is enabled by default. Seems there is anstr.expandtabs(tab_width)
missing somewhere?I will go on working with "space indention" anyway as tabs won't obviously work with different
tab_width
values, but maybe you can provide some kind of hint or automatically enable space indention for syntax_test_files?