Added user home inplace replacement in configs
This commit is contained in:
parent
135304cedc
commit
96abe163a5
@ -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)
|
@ -148,4 +148,4 @@
|
||||
},
|
||||
"trace": "verbose",
|
||||
"workspaceFolders": "[\n {\n \"uri\": pathlib.Path(repository_absolute_path).as_uri(),\n \"name\": os.path.basename(repository_absolute_path),\n }\n ]"
|
||||
}
|
||||
}
|
@ -1,6 +1,7 @@
|
||||
{
|
||||
"java": {
|
||||
"info": "https://download.eclipse.org/jdtls/",
|
||||
"info-init-options": "https://github.com/eclipse-jdtls/eclipse.jdt.ls/wiki/Running-the-JAVA-LS-server-from-the-command-line",
|
||||
"link": "https://download.eclipse.org/jdtls/milestones/?d",
|
||||
"command": "lsp-ws-proxy --listen 4114 -- jdtls",
|
||||
"alt-command": "lsp-ws-proxy -- jdtls",
|
||||
@ -17,11 +18,31 @@
|
||||
],
|
||||
"settings": {
|
||||
"java": {
|
||||
"autobuild": {
|
||||
"enabled": false
|
||||
},
|
||||
"completion": {
|
||||
"enabled": true,
|
||||
"importOrder": [
|
||||
"java",
|
||||
"javax",
|
||||
"org",
|
||||
"com"
|
||||
]
|
||||
},
|
||||
"configuration": {
|
||||
"maven": {
|
||||
"userSettings": "{user.home}/.config/jdtls/settings.xml",
|
||||
"globalSettings": "{user.home}/.config/jdtls/settings.xml"
|
||||
},
|
||||
"runtimes": [
|
||||
]
|
||||
},
|
||||
"classPath": [
|
||||
"~/.m2/repository/**/*.jar"
|
||||
"{user.home}/.config/jdtls/m2/repository/**/*.jar"
|
||||
],
|
||||
"docPath": [
|
||||
"~/.m2/repository/**/*.jar"
|
||||
"{user.home}/.config/jdtls/m2/repository/**/*.jar"
|
||||
],
|
||||
"silentNotification": true,
|
||||
"project": {
|
||||
@ -176,7 +197,7 @@
|
||||
},
|
||||
"jedi":{
|
||||
"extra_paths": [
|
||||
"/home/abaddon/Portable_Apps/py-venvs/pylsp-venv/venv/lib/python3.10/site-packages"
|
||||
"{user.home}/Portable_Apps/py-venvs/pylsp-venv/venv/lib/python3.10/site-packages"
|
||||
],
|
||||
"root_dir": ""
|
||||
}
|
||||
@ -204,9 +225,9 @@
|
||||
"markupKindPreferred": "markdown",
|
||||
"workspace": {
|
||||
"extraPaths": [
|
||||
"/home/abaddon/Portable_Apps/py-venvs/pylsp-venv/venv/lib/python3.10/site-packages"
|
||||
"{user.home}/Portable_Apps/py-venvs/pylsp-venv/venv/lib/python3.10/site-packages"
|
||||
],
|
||||
"environmentPath": "/home/abaddon/Portable_Apps/py-venvs/gtk-apps-venv/venv/bin/python",
|
||||
"environmentPath": "{user.home}/Portable_Apps/py-venvs/gtk-apps-venv/venv/bin/python",
|
||||
"symbols": {
|
||||
"ignoreFolders": [".nox", ".tox", ".venv", "__pycache__", "venv"],
|
||||
"maxSymbols": 20
|
||||
|
Loading…
Reference in New Issue
Block a user