add formatter settings
This commit is contained in:
@@ -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)
|
||||||
|
|||||||
@@ -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.",
|
||||||
|
|||||||
Reference in New Issue
Block a user