79522204

Date: 2025-03-20 07:50:02
Score: 1
Natty:
Report link

I now have 2 working solutions, thanks to @rioV8 and @starball:

  1. package.json - add the following contribution to the correct section:
"configurationDefaults": {
            "[ABC]": {
                "editor.minimap.markSectionHeaderRegex": " ... regex goes here ... "
            }
        }
  1. activate() - Additional code within the extension:
const scope: vscode.ConfigurationScope = { languageId: "ABC" };
const inspect = vscode.workspace.getConfiguration("editor", scope).inspect("minimap.markSectionHeaderRegex");
if ( !inspect?.workspaceLanguageValue )
{
    vscode.workspace.getConfiguration("editor", scope).update("minimap.markSectionHeaderRegex", " ... regex goes here ... ", vscode.ConfigurationTarget.Workspace, true);
}

I went for solution 1. as it seems to be the cleaner solution for the extension I'm working on.

Reasons:
  • Blacklisted phrase (0.5): thanks
  • Long answer (-0.5):
  • Has code block (-0.5):
  • User mentioned (1): @rioV8
  • User mentioned (0): @starball
  • Self-answer (0.5):
Posted by: Eric