Added user home inplace replacement in configs
This commit is contained in:
@@ -107,13 +107,15 @@ class SettingsManager(StartCheckMixin, Singleton):
|
||||
|
||||
try:
|
||||
with open(self._LSP_CONFIG) as file:
|
||||
self._lsp_config_data = json.load(file)
|
||||
data = file.read().replace("{user.home}", self.get_home_path())
|
||||
self._lsp_config_data = json.loads(data)
|
||||
except Exception as e:
|
||||
print( f"Settings Manager: {self._LSP_CONFIG}\n\t\t{repr(e)}" )
|
||||
|
||||
try:
|
||||
with open(self._LSP_INIT_CONFIG) as file:
|
||||
self._lsp_init_data = json.load(file)
|
||||
data = file.read().replace("{user.home}", self.get_home_path())
|
||||
self._lsp_init_data = json.loads(data)
|
||||
except Exception as e:
|
||||
print( f"Settings Manager: {self._LSP_INIT_CONFIG}\n\t\t{repr(e)}" )
|
||||
|
||||
@@ -212,4 +214,4 @@ class SettingsManager(StartCheckMixin, Singleton):
|
||||
|
||||
def save_settings(self):
|
||||
with open(self._CONFIG_FILE, 'w') as outfile:
|
||||
json.dump(self.settings.as_dict(), outfile, separators=(',', ':'), indent=4)
|
||||
json.dump(self.settings.as_dict(), outfile, separators=(',', ':'), indent=4)
|
||||
Reference in New Issue
Block a user