-
Notifications
You must be signed in to change notification settings - Fork 0
/
settings.py
26 lines (20 loc) · 988 Bytes
/
settings.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
import sublime
class sublimeGitMojiSettings:
def __init__(self, parent=None):
self.parent = parent
self.global_settings = sublime.load_settings(
"SublimeGitMoji.sublime-settings")
def get(self, key, default=None):
window = sublime.active_window()
view = window.active_view()
project_sublimeGitMoji_settings = view.settings().get("SublimeGitMoji", {}) or {}
print(project_sublimeGitMoji_settings.keys)
if key in project_sublimeGitMoji_settings:
return project_sublimeGitMoji_settings[key]
# fall back to old style project setting
project_data = window.project_data()
if project_data and "SublimeGitMoji" in project_data:
project_sublimeGitMoji_settings = project_data["SublimeGitMoji"]
if key in project_sublimeGitMoji_settings:
return project_sublimeGitMoji_settings.get(key)
return self.global_settings.get(key, default)