Skip to content

Commit 68c5e74

Browse files
committed
Fix #4215 Use kpsewhich.class.enabled and kpsewhich.bibtex.enabled to control kpsewhich
1 parent afe93c7 commit 68c5e74

File tree

4 files changed

+22
-3
lines changed

4 files changed

+22
-3
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# Change Log
22

3+
## Unreleased
4+
5+
### Fixed
6+
- (#4215) Use `kpsewhich.class.enabled` and `kpsewhich.bibtex.enabled` to control `kpsewhich`.
7+
- Replaces `kpsewhich.enabled`.
8+
- (#4227) Ignore label defs in `xparse` macros.
9+
310
## [9.19.2] - 2024-04-04
411

512
### Fixed

package.json

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1107,7 +1107,19 @@
11071107
"scope": "window",
11081108
"type": "boolean",
11091109
"default": true,
1110-
"markdownDescription": "Use kpsewhich as defined by `#latex-workshop.kpsewhich.path#` to resolve latex class and bibliography file paths for intellisense parsing."
1110+
"markdownDeprecationMessage": "**Deprecated**: Please use `#latex-workshop.kpsewhich.class.enabled#` and `#latex-workshop.kpsewhich.bibtex.enabled#` instead."
1111+
},
1112+
"latex-workshop.kpsewhich.class.enabled": {
1113+
"scope": "window",
1114+
"type": "boolean",
1115+
"default": true,
1116+
"markdownDescription": "Use kpsewhich as defined by `#latex-workshop.kpsewhich.path#` to resolve latex class paths for intellisense parsing."
1117+
},
1118+
"latex-workshop.kpsewhich.bibtex.enabled": {
1119+
"scope": "window",
1120+
"type": "boolean",
1121+
"default": true,
1122+
"markdownDescription": "Use kpsewhich as defined by `#latex-workshop.kpsewhich.path#` to resolve bibliography file paths for intellisense parsing."
11111123
},
11121124
"latex-workshop.latex.bibDirs": {
11131125
"scope": "window",

src/completion/completer/package.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ function toPackageObj(packageName: string, options: string[], node?: Ast.Node):
232232
}
233233
let pkgObj: {[pkgName: string]: string[]} = {}
234234
if (node?.type === 'macro' && node.content === 'documentclass') {
235-
if (vscode.workspace.getConfiguration('latex-workshop').get('kpsewhich.enabled') as boolean) {
235+
if (vscode.workspace.getConfiguration('latex-workshop').get('kpsewhich.class.enabled') as boolean) {
236236
const clsPath = lw.file.kpsewhich([`${packageName}.cls`])
237237
if (clsPath && fs.existsSync(clsPath)) {
238238
pkgObj = parseContent(fs.readFileSync(clsPath).toString())

src/core/file.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ function getBibPath(bib: string, baseDir: string): string[] {
275275
const bibPath = bib.includes('*') ? utils.resolveFileGlob(searchDirs, bib, '.bib') : utils.resolveFile(searchDirs, bib, '.bib')
276276

277277
if (bibPath === undefined || bibPath.length === 0) {
278-
if (configuration.get('kpsewhich.enabled')) {
278+
if (configuration.get('kpsewhich.bibtex.enabled')) {
279279
const kpsePath = kpsewhich(['-format=.bib', bib])
280280
return kpsePath ? [ kpsePath ] : []
281281
} else {

0 commit comments

Comments
 (0)