Skip to content

Commit 045458d

Browse files
remcohaszingChristianMurphyjohnsoncodehk
authored
Integrate Volar (#340)
- Volar handles the mapping between TypeScript and LSP. - Volar handles the mapping between TypeScript and Monaco editor. - Volar manages virtual files. - Volar imports TypeScript directly. As a result, the Monaco editor integration now requires `path` to be polyfilled. - `@mdx-js/monaco` is deprecated and removed. - This adds `remark-frontmatter` with TOML and YAML support as well as `remark-gfm` by default unless specified otherwise in `tsconfig.json`. - The language server now requires `typescript.tsdk` to be passed via initialization options. - This adds support for debugging virtual documents using Volar labs. Closes #168 Closes #284 Closes #295 Closes #298 Closes #301 Co-authored-by: Christian Murphy <[email protected]> Co-authored-by: Johnson Chu <[email protected]>
1 parent 4dbf0ec commit 045458d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

73 files changed

+1885
-4652
lines changed

.changeset/get-language-module.md

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
'@mdx-js/language-service': minor
3+
---
4+
5+
Add function `getLanguageModule`.
6+
This function returns a [Volar](https://volarjs.dev) language module,

.changeset/language-server.md

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
'@mdx-js/language-server': minor---
3+
'vscode-mdx': minor
4+
---
5+
6+
The language server and Visual Studio Code extension are now based on [Volar](https://volarjs.dev).

.changeset/monaco.md

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
'@mdx-js/monaco': minor
3+
---
4+
5+
Remove `@mdx-js/monaco`.
6+
Use [`@volar/monaco`](https://github.com/volarjs/volar.js/tree/master/packages/monaco) and `@mdx-js/language-service` instead.

.changeset/pretty-files-sell.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@mdx-js/language-service': minor
3+
---
4+
5+
Remove `createMdxLanguageService`.

.gitattributes

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
* text eol=lf
2+
*.png binary diff=image

.github/workflows/main.yml

+1-5
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,11 @@ jobs:
1313
with:
1414
node-version: ${{matrix.node}}
1515
- run: npm install
16-
- run: npx playwright install --with-deps
1716
- run: npm test
1817
strategy:
1918
matrix:
2019
os:
2120
- ubuntu-latest
22-
# We should test on Windows, because the language server deals with
23-
# the file system.
24-
# Currently blocked by https://github.com/remcohaszing/playwright-monaco/issues/1
25-
# - windows-latest
21+
- windows-latest
2622
node:
2723
- 18

README.md

-5
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ It contains the following workspaces:
1414
can handle MDX files.
1515
* [`@mdx-js/language-server`][] provides MDX IntelliSense using the
1616
[Language Server Protocol][].
17-
* [`@mdx-js/monaco`][] provides MDX IntelliSense for [Monaco editor][].
1817
* [`vscode-mdx`][] provides MDX IntelliSense and basic language support for
1918
[Visual Studio Code][].
2019

@@ -92,8 +91,6 @@ See [§ Sponsor][sponsor] on our site for how to help financially.
9291

9392
[MIT][] © [JounQin][]@[1stG.me][]
9493

95-
[`@mdx-js/monaco`]: https://github.com/mdx-js/mdx-analyzer/tree/main/packages/monaco
96-
9794
[`@mdx-js/language-server`]: https://github.com/mdx-js/mdx-analyzer/tree/main/packages/language-server
9895

9996
[`@mdx-js/language-service`]: https://github.com/mdx-js/mdx-analyzer/tree/main/packages/language-service
@@ -108,8 +105,6 @@ See [§ Sponsor][sponsor] on our site for how to help financially.
108105

109106
[mdx]: https://github.com/mdx-js/mdx
110107

111-
[monaco editor]: https://microsoft.github.io/monaco-editor/
112-
113108
[mit]: http://opensource.org/licenses/MIT
114109

115110
[sponsor]: https://mdxjs.com/community/sponsor/

demo/LICENSE

-21
This file was deleted.

demo/README.md

-52
This file was deleted.

demo/package.json

-23
This file was deleted.

demo/src/index.css

-160
This file was deleted.

demo/src/index.ejs

-28
This file was deleted.

0 commit comments

Comments
 (0)