Skip to content

Commit

Permalink
Fix #4252 intellisense.label.command should not affect ref parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
James-Yu committed Apr 29, 2024
1 parent b58bc13 commit 2b95587
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/completion/completer/reference.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down

0 comments on commit 2b95587

Please sign in to comment.