MDX Jump
A VS Code extension that adds Go to Definition support for Astro/Vue components used in .mdx files.
Features
- In an
.mdx file, place cursor on component tag like <Projects /> and run Go to Definition (F12).
- Resolves default imports such as:
- Relative paths:
../../components/Projects.vue
- Aliased paths:
@/components/... (tries <workspace>/src first, then workspace root)
- Supports target file extensions:
.astro, .vue, .tsx, .ts, .jsx, .js
Quick Start (Local)
- Open this folder in VS Code
- Install deps:
pnpm install
- Build:
pnpm run build
- Press
F5 to launch Extension Development Host.
- Open an
.mdx file in the host window and test on component tags.
Publish Checklist
- Replace placeholders in
package.json:
repository.url
bugs.url
homepage
- Create a publisher in Visual Studio Marketplace.
- Create an Azure DevOps PAT with Marketplace publish permission.
- Add repository secret in GitHub:
VSCE_PAT.
- Push to
main to trigger auto publish (workflow will auto bump patch version).
Manual publish (optional):
npx @vscode/vsce login <publisher>
npx @vscode/vsce publish
You can also package first:
npx @vscode/vsce package
Notes
- This extension is intentionally lightweight and regex-based.
- It currently focuses on default imports + PascalCase component tags.
- Named imports and tsconfig path mappings can be added in later versions.
| |