Configuration Settings Path
After installing, I copied the %PACKAGES%/FileHeader.sublime-settings file to %PACKAGES%/User/FileHeader.sublime-settings and configured to my liking - however it doesn't seem to ever be used - I assumed it would, since this is how sublime plugins typically work - a default configuration file is provided - then you can override those settings in your own configuration file in %PACKAGES%/User/ExtensionName.sublime-settings file.
I was curious why it wasn't working - so I checked how they're loaded and found:
load_settings(base_name): Loads the named settings. The name should include a file name and extension, but not a path. The packages will be searched for files matching the base name, and the results will be collated into the settings object. Subsequent calls to load_settings with the name base_name will return the same object, and not load the settings from disk again. -- https://www.sublimetext.com/docs/3/api_reference.html
I checked the source for FileHeader and found:
return sublime.load_settings('%s.sublime-settings' % PLUGIN_NAME)
The key thing there is that the expected behavior and use of sublime.load_settings(...) specifies that only a filename should be passed in - not a full path - because that breaks the ability for users to override the settings in %PACKAGES%/User/PluginName.sublime-settings. This allows users to version control and synchronize the files in that directory across multiple platforms & systems.
Any chance that could be adjusted to allow the user settings file to override the plugin's defaults?
please modify user settings Preferences -> Package Settings -> File Header -> Settings - User
Setting the user settings via the above method works just fine for me on ST3 on OSX El Cap.
It would be good to update the Readme to clarify to users to update the User Settings for the Package and not Sublime it's self. When reading the docs, I interpret it as the one for Sublime.
@renderbox I see what you mean, but to play devil's advocate I also think the current wording is fine.
Sublime supports a LOT of setting configurations, which are basically broken done like this:
- User settings for sublime itself - these are settings that change the way that sublime itself behaves. Notably, this file should not, and typically does not, have any settings related to packages.
Then, per package, there are also:
- default package level settings that effect the package in all projects
- user-specific package level settings that override the defaults for the package and effect all projects.
- project-level settings that will over-ride the global (effecting all projects) package user-settings.
With the understanding that the readme is talking about the settings for a package, I don't know how necessary a clarification is, or how better to word it. That being said, i'm just someone who likes the package and uses it, so @shiyanhui is the final say. But you can always try submitting a pull request.