From 2b95587dcff30b8ca769143afd0d06e6157710f7 Mon Sep 17 00:00:00 2001 From: James Yu Date: Mon, 29 Apr 2024 09:37:43 +0100 Subject: [PATCH] Fix #4252 `intellisense.label.command` should not affect ref parsing --- src/completion/completer/reference.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/completion/completer/reference.ts b/src/completion/completer/reference.ts index 33ba96511..febd0a05b 100644 --- a/src/completion/completer/reference.ts +++ b/src/completion/completer/reference.ts @@ -124,7 +124,8 @@ function parse(cache: FileCache) { if (cache.ast !== undefined) { const configuration = vscode.workspace.getConfiguration('latex-workshop') const labelMacros = configuration.get('intellisense.label.command') as string[] - cache.elements.reference = parseAst(cache.ast, [], cache.filePath, cache.content.split('\n'), labelMacros) + const defaultLabelMacros = configuration.inspect('intellisense.label.command')?.defaultValue as string[] + cache.elements.reference = parseAst(cache.ast, [], cache.filePath, cache.content.split('\n'), [... new Set(labelMacros.concat(defaultLabelMacros))]) } else { cache.elements.reference = parseContent(cache.content, cache.filePath) }