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), path: resolveVariables(config.get<string[]>(`path`) ?? [], workspace),
interpreter: resolveVariables(interpreter, workspace), interpreter: resolveVariables(interpreter, workspace),
importStrategy: config.get<string>(`importStrategy`) ?? "useBundled", 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 return workspaceSetting
} }
@@ -109,7 +110,8 @@ export async function getGlobalSettings(
path: getGlobalValue<string[]>(config, "path", []), path: getGlobalValue<string[]>(config, "path", []),
interpreter: interpreter, interpreter: interpreter,
importStrategy: getGlobalValue<string>(config, "importStrategy", "useBundled"), 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 return setting
} }
@@ -123,7 +125,8 @@ export function checkIfConfigurationChanged(
`${namespace}.path`, `${namespace}.path`,
`${namespace}.interpreter`, `${namespace}.interpreter`,
`${namespace}.importStrategy`, `${namespace}.importStrategy`,
`${namespace}.showNotifications` `${namespace}.showNotifications`,
`${namespace}.formatter`
] ]
const changed = settings.map((s) => e.affectsConfiguration(s)) const changed = settings.map((s) => e.affectsConfiguration(s))
return changed.includes(true) return changed.includes(true)
+6 -1
View File
@@ -79,6 +79,11 @@
], ],
"configuration": { "configuration": {
"properties": { "properties": {
"nx-post-support.formatter": {
"type": "boolean",
"default": false,
"description": "Use the TCL formatter from `NX Postprocessor Support`"
},
"nx-post-support.importStrategy": { "nx-post-support.importStrategy": {
"default": "useBundled", "default": "useBundled",
"description": "Defines where `NX Postprocessor Support` is imported from.", "description": "Defines where `NX Postprocessor Support` is imported from.",
@@ -118,4 +123,4 @@
"prettier": "^3.4.2", "prettier": "^3.4.2",
"typescript": "^5.7.2" "typescript": "^5.7.2"
} }
} }