-
-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Update to Volar 2.4 alpha (#879)
* Upgrade to Volar 2.3 * Fix tests * bump * Remove updateVirtualCode hooks * Update Volar * Update client.ts * Update Volar * Update to 2.3.0 * Fix tests * Add muggle-string * chore: bump Volar * chore: bump Volar * Update init.test.ts * chore: bump Volar * chore: bump Volar * Update to Volar 3.4 alpha * Update pnpm-lock.yaml * Fix tests * Update init.test.ts * getVueLanguageModule -> getVueLanguagePlugin * chore: changeset --------- Co-authored-by: Princesseuh <3019731+Princesseuh@users.noreply.github.com>
- Loading branch information
1 parent
a1769da
commit b8a6af3
Showing
27 changed files
with
478 additions
and
393 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
"@astrojs/language-server": minor | ||
"@astrojs/check": minor | ||
"@astrojs/ts-plugin": minor | ||
"astro-vscode": minor | ||
--- | ||
|
||
Upgrades to the latest version of Volar, the underlying framework powering the Astro language server. This update should fix some of the recent issues regarding intellisense inside script tags. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import type { Mapping } from '@volar/language-core'; | ||
import type { Segment } from 'muggle-string'; | ||
|
||
export function buildMappings<T>(chunks: Segment<T>[]) { | ||
let length = 0; | ||
const mappings: Mapping<T>[] = []; | ||
for (const segment of chunks) { | ||
if (typeof segment === 'string') { | ||
length += segment.length; | ||
} else { | ||
mappings.push({ | ||
sourceOffsets: [segment[2]], | ||
generatedOffsets: [length], | ||
lengths: [segment[0].length], | ||
data: segment[3]!, | ||
}); | ||
length += segment[0].length; | ||
} | ||
} | ||
return mappings; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.