added a line numbers option

This commit is contained in:
SpookyDervish
2025-10-31 07:34:52 +11:00
parent ff3137419a
commit 084d7b4dff
3 changed files with 18 additions and 2 deletions

View File

@@ -55,6 +55,12 @@ class ConfigHandler:
return config_dir
def get(self, section: str, option: str):
if not self.config.has_section(section):
self.config.add_section(section)
if not self.config.has_option(section, option):
self.set(section, option, "0")
return "0"
return self.config.get(section, option, fallback=None)
def set(self, section: str, option: str, new_value: str):
@@ -86,7 +92,8 @@ class ConfigHandler:
"version": "1"
}
self.config["editor"] = {
"word_wrap": "0"
"word_wrap": "0",
"line_numbers": "1"
}
self.config["plugins"] = {
"enabled": "1",