Skip to content

Commit

Permalink
Fix resolving remark plugins from tsconfig.json
Browse files Browse the repository at this point in the history
Closes #442
  • Loading branch information
remcohaszing committed May 27, 2024
1 parent 3104d7c commit 0e2e0e7
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
7 changes: 7 additions & 0 deletions .changeset/dry-apes-rush.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'@mdx-js/typescript-plugin': patch
'@mdx-js/language-server': patch
'vscode-mdx': patch
---

Fix resolving remark plugins specified in `tsconfig.json`
2 changes: 1 addition & 1 deletion packages/language-server/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ connection.onInitialize(async (parameters) => {
commandLine.raw?.mdx,
(name) =>
/** @type {Promise<Plugin>} */ (
loadPlugin(name, {prefix: 'remark', from: pathToFileURL(cwd)})
loadPlugin(name, {prefix: 'remark', from: pathToFileURL(cwd) + '/'})
)
)
checkMdx = Boolean(commandLine.raw?.mdx?.checkMdx)
Expand Down
2 changes: 1 addition & 1 deletion packages/typescript-plugin/index.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ const plugin = createAsyncLanguageServicePlugin(
commandLine.raw?.mdx,
(name) =>
/** @type {Promise<Plugin>} */ (
loadPlugin(name, {prefix: 'remark', from: pathToFileURL(cwd)})
loadPlugin(name, {prefix: 'remark', from: pathToFileURL(cwd) + '/'})
)
)

Expand Down

0 comments on commit 0e2e0e7

Please sign in to comment.