@volar/language-core 2.4.20 → 2.4.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/editor.js CHANGED
@@ -74,7 +74,9 @@ function isImplementationEnabled(info) {
74
74
  return !!info.navigation;
75
75
  }
76
76
  function isHighlightEnabled(info) {
77
- return !!info.navigation;
77
+ return typeof info.navigation === 'object'
78
+ ? info.navigation.shouldHighlight?.() ?? true
79
+ : !!info.navigation;
78
80
  }
79
81
  function isSymbolsEnabled(info) {
80
82
  return !!info.structure;
package/lib/types.d.ts CHANGED
@@ -92,6 +92,7 @@ export interface CodeInformation {
92
92
  };
93
93
  /** virtual code is expected correctly reflect reference relationships of the source code */
94
94
  navigation?: boolean | {
95
+ shouldHighlight?(): boolean;
95
96
  shouldRename?(): boolean;
96
97
  resolveRenameNewName?(newName: string): string;
97
98
  resolveRenameEditText?(newText: string): string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@volar/language-core",
3
- "version": "2.4.20",
3
+ "version": "2.4.22",
4
4
  "license": "MIT",
5
5
  "files": [
6
6
  "**/*.js",
@@ -12,7 +12,7 @@
12
12
  "directory": "packages/language-core"
13
13
  },
14
14
  "dependencies": {
15
- "@volar/source-map": "2.4.20"
15
+ "@volar/source-map": "2.4.22"
16
16
  },
17
- "gitHead": "a95effedf7b74d3fa8f5d5e168b6d597e3aaca62"
17
+ "gitHead": "5e2c8f4ba3e71e322101a94139943edf41e054d1"
18
18
  }