Is it possible to read in settings from my plugin’s constructor?
I have the following directory structure:
Packages/MyPlugin/
MyPlugin.py
MyPlugin.sublime-settings
MyPlugin.sublime-settings looks like:
{"hello":"world"}
MyPlugin.py looks like:
[code]import sublime, sublime_plugin, sys
class MyPlugin(sublime_plugin.ApplicationCommand):
# On init read the settings and build the new key mappings
def init(self):
super(MyPlugin, self).init()
sys.stdout.write(‘Init MyPlugin\n’)
s = sublime.load_settings('MyPlugin.sublime-settings')
w = s.get('hello', 'backup')
sys.stdout.write('type:' + type(w).__name__+'\n')[/code]
When my plugin loads I always get:
type:NoneType