open folders
This commit is contained in:
@@ -13,6 +13,8 @@ class ConfigHandler:
|
||||
self.plugin_defined_settings = {}
|
||||
self.config_dir: str = self.ensure_hidden_config_dir()
|
||||
self.load_settings()
|
||||
|
||||
|
||||
|
||||
def define_plugin_setting(self, plugin_name: str, option_name: str, description: str, option_type: str, default_value: Any, on_changed_func = None):
|
||||
actual_type = None
|
||||
@@ -88,10 +90,19 @@ class ConfigHandler:
|
||||
def load_settings(self):
|
||||
if os.path.isfile(self.config_dir / "config.ini"):
|
||||
self.config.read(self.config_dir / "config.ini")
|
||||
return
|
||||
|
||||
if int(self.get("config", "version")) < 2:
|
||||
self.app.notify(
|
||||
message="Your config version is out of date! We've loaded the defaults but your config is untouched.",
|
||||
title="Config Version Outdated",
|
||||
severity="warning",
|
||||
timeout=15
|
||||
)
|
||||
else:
|
||||
return
|
||||
|
||||
self.config["config"] = {
|
||||
"version": "1"
|
||||
"version": "2"
|
||||
}
|
||||
self.config["editor"] = {
|
||||
"word_wrap": "0",
|
||||
@@ -99,6 +110,7 @@ class ConfigHandler:
|
||||
"default_editors": {},
|
||||
"bindings": {
|
||||
"open": "ctrl+o",
|
||||
"open-folder": "ctrl+shift+o",
|
||||
"new": "ctrl+n",
|
||||
"save": "ctrl+s",
|
||||
"save-as": "ctrl+shift+s",
|
||||
|
||||
Reference in New Issue
Block a user