mdx-analyzer
mdx-analyzer copied to clipboard
[feat] IntelliSense support
references:
- https://github.com/microsoft/vscode/issues/92805#issuecomment-599852139
- https://github.com/microsoft/vscode/blob/main/extensions/html-language-features/server/src/modes/javascriptMode.ts#L57
- https://code.visualstudio.com/api/language-extensions/language-server-extension-guide
Would be so great to have this - even just partial IntelliSense like auto-imports would be a huge time saver when authoring MDX documents!
As an additional data point, the MDX plugin from JetBrains: https://plugins.jetbrains.com/plugin/14944-mdx
And the original discussion about it: https://youtrack.jetbrains.com/issue/WEB-32599
Just wondering?! if this goes through would it also enable typescript powered autocompletion?
Got MDX Code Completion working in Gatsby & Monaco. Maybe this helps implementing it into the vscode plugin:
https://github.com/hashbite/gatsby-mdx-suite/blob/main/themes/docs/src/components/live-editor/autocompletion.ts
https://gatsby-mdx-suite-full.netlify.app/docs/playground/
This would be an excellent addition. We love writing really rich documentation in Storybook with MDX, but the lack of code completion for components and imports is a bit of a pain.
Ohh, VS Code 1.64 has IntelliSense for paths in Markdown files!
I asked in the PR as to whether it could be enabled also for MDX.
Hey folks!
I guess we can do something like volar(vue language service) and svelte language service. To integrate mdx with ts server.
Luckly the syntax of mdx is simple. I'll start some work in this few days.
This would be incredible for the MDX developer experience!
Typescript/intellisense support would make MDX one of the most powerful authoring tools on the planet. Prove me wrong!
Without it, it makes MDX very difficult to adopt. This is not a thin line, but rather a giant chasm in the modern development workflow. Let's do it!
Please add intellisense feature to the extension! :sob: :sob:
Wonder if the new Markdown Language Service and Markdown Language Server that the VS Code team just open sourced as part of 1.70 would be helpful with the implementation:
This iteration, we extracted much of VS Code's tooling for writing Markdown into a library and language server. This includes our tooling for path completions, document outlines, and diagnostics.
- Source: https://code.visualstudio.com/updates/v1_70#_markdown-language-server
- Blog post: https://code.visualstudio.com/blogs/2022/08/16/markdown-language-server
Maybe this code is also partly behind the Markdown path IntelliSense feature in 1.64:
The built-in Markdown extension now includes path IntelliSense for links and images.
Starting October I’m going to have significantly more time to spend on OSS. Intellisense for MDX is one of the first things I’m interested to work on. Of course this requires some research at first to figure out what intellisense for MDX means (Hover effects, autocomplete, document outline, etc), and how to get a basic implementation up and running.
Ideally this is built as a language server, so the same language features can be provided in VSCode / Vim / NeoVim / Emacs / Your favourite editor. Also in my experience language servers are simpler to work with when consuming ESM and relatively straight-forward to test.
@remcohaszing any news about this? It could be really useful.
Yes, I avoided cross referencing this issue to keep it a bit under the radar, but IMO #226 is ready to be reviewed and released as an experimental feature.