Skip to content

Commit ff77d37

Browse files
committed
Enable syntax highlighting, type checking and autocompletion for MDX files
1 parent 28940c1 commit ff77d37

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

.vscode/settings.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,10 @@
1919
"authorTitle"
2020
],
2121
"editor.inlineSuggest.showToolbar": "onHover",
22-
"terminal.integrated.cwd": "website"
22+
"terminal.integrated.cwd": "website",
23+
"files.associations": {
24+
"*.mdx": "mdx"
25+
},
26+
"mdx.experimentalLanguageServer": true,
27+
"typescript.tsserver.experimental.enableProjectDiagnostics": true
2328
}

website/tsconfig.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,16 @@
33
"extends": "@docusaurus/tsconfig",
44
"compilerOptions": {
55
"baseUrl": "."
6+
},
7+
"exclude": [
8+
".*/",
9+
"build/",
10+
"node_modules/",
11+
"static/"
12+
],
13+
"mdx": {
14+
// Enable strict type checking in MDX files.
15+
// See also: https://github.com/mdx-js/mdx-analyzer?tab=readme-ov-file#typescript
16+
"checkMdx": true
617
}
718
}

0 commit comments

Comments
 (0)