Sublime Forum

The Settings Hierarchy: Syntax-Specific over Project-Specific?

#1

The current settings hierarchy is:

  • Packages/Default/Preferences.sublime-settings
  • Packages/Default/Preferences (Windows).sublime-settings
  • Packages/AnyOtherPackage/Preferences.sublime-settings
  • Packages/AnyOtherPackage/Preferences (Windows).sublime-settings
  • Packages/User/Preferences.sublime-settings
  • Settings from the current project
  • Packages/Python/Python.sublime-settings
  • Packages/Python/Python (Windows).sublime-settings
  • Packages/User/Python.sublime-settings
  • Session data for the current file
  • Auto-adjusted settings

according to the documentation. So here are my questions:

  1. Why should syntax-specific settings override project specific ones? For example, I like to indent with tab in C++ files, but I would comply with the project convention if it is required to indent with four spaces. I thought it makes more sense for project-specific settings to override any user settings, including syntax-specific ones since they come with the specific user.
  2. Is there any workaround, for example, to have a “project-and-syntax-specific” setting that overrides the syntax settings (making it between Packages/User/Python.sublime-settings and “Session data for the current file” in the hierarchy)?
3 Likes

How to load a custom package setting respecting the Sublime Text settings hierarchy?
#2

The ‘proper’ solution imo would be, as you mentioned, per-project and syntax-specific settings, but these do not exist.

Since view-specific settings override anything, it is possible to fake that functionality with a plugin however.

2 Likes

#3

I was just reminded that http://editorconfig.org is still a thing.

3 Likes