Open kylebebak opened 5 years ago
For anyone interested in fixing this, you need to do two things:
"enable_language_service_for_javascript": false,
to your User/Preferences.sublime-settings
file.(side note: this setting should definitely not be in User/Preferences.sublime-settings
, but rather in User/TypeScript.sublime-settings
, because the former file is for settings that apply to all of Sublime Text, not just one package...)
"use_tab_stops": true,
to User/JavaScript.sublime-settings
. For reasons I don't understand this plugin overwrites your JavaScript settings with its own JavaScript.sublime-settings
, which means overriding enable_language_service_for_javascript
alone isn't enough.Finally, if you want tab stops to work TypeScript, you have no other option than to use tabs instead of spaces. Create a User/TypeScript.sublime-settings
file and add the following:
{
"translate_tabs_to_spaces": false,
}
I'm aware this issue is quite nearly a duplicate of #147 , but it's worth creating in any case, because this plugin not only breaks the
use_tab_stops
setting for the TypeScript syntax... It also breaks it for files with the JavaScript syntax.As good as the plugin might be, it's really not acceptable that it breaks core Sublime Text functionality for file types it doesn't even work with.
To repro the issue, just create a new view, throw in some JS code:
Tab stops still work. As soon as you save the file, e.g. as
untitled.js
, tab stops stop working.If you remove the TypeScript plugin, close
untitled.js
and reopen it, tab stops work again. This behavior was not easy pin down.