add formatter settings

This commit is contained in:
Christoph Brandau
2025-07-21 09:08:53 +02:00
parent 61fb0bc5d2
commit ee5240c861
2 changed files with 12 additions and 4 deletions
+6 -3
View File
@@ -78,7 +78,8 @@ export async function getWorkspaceSettings(
path: resolveVariables(config.get<string[]>(`path`) ?? [], workspace),
interpreter: resolveVariables(interpreter, workspace),
importStrategy: config.get<string>(`importStrategy`) ?? "useBundled",
showNotifications: config.get<string>(`showNotifications`) ?? "off"
showNotifications: config.get<string>(`showNotifications`) ?? "off",
formatter: config.get<boolean>(`formatter`) ?? false
}
return workspaceSetting
}
@@ -109,7 +110,8 @@ export async function getGlobalSettings(
path: getGlobalValue<string[]>(config, "path", []),
interpreter: interpreter,
importStrategy: getGlobalValue<string>(config, "importStrategy", "useBundled"),
showNotifications: getGlobalValue<string>(config, "showNotifications", "off")
showNotifications: getGlobalValue<string>(config, "showNotifications", "off"),
formatter: config.get<boolean>(`formatter`) ?? false
}
return setting
}
@@ -123,7 +125,8 @@ export function checkIfConfigurationChanged(
`${namespace}.path`,
`${namespace}.interpreter`,
`${namespace}.importStrategy`,
`${namespace}.showNotifications`
`${namespace}.showNotifications`,
`${namespace}.formatter`
]
const changed = settings.map((s) => e.affectsConfiguration(s))
return changed.includes(true)
+5
View File
@@ -79,6 +79,11 @@
],
"configuration": {
"properties": {
"nx-post-support.formatter": {
"type": "boolean",
"default": false,
"description": "Use the TCL formatter from `NX Postprocessor Support`"
},
"nx-post-support.importStrategy": {
"default": "useBundled",
"description": "Defines where `NX Postprocessor Support` is imported from.",