-
-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[feat] IntelliSense support #165
Comments
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: |
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. |
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! 😭 😭 |
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:
Maybe this code is also partly behind the Markdown path IntelliSense feature in 1.64:
|
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. |
This is a first implementation of MDX IntelliSense for multiple editors. The idea is to turn this repository into a monorepo. The following packages have been added: - `@mdx-js/language-service` handles the actual logic needed for intellisense features. It wraps the TypeScript language service interface and handles MDX syntax. - `@mdx-js/language-server` provides `@mdx-js/language-service` as an actual language server. This package is supposed to be consumed by projects such as NeoVim, `vim-lsp`, `sublimelsp`, and Emacs `lsp-mode`. - `@mdx-js/language-client` is an internal package to integrates `@mdx-js/language-server` into VSCode. - `@mdx-js/monaco` integrates `@mdx-js/language-service` into Monaco editor. - `vscode-mdx` is the mono-repo root and provides `@mdx-js/language-server` as a VSCode plugin. Todos after these changes: - Go through “marketing” material, as in, examples, but also docs - Perhaps add tools like stylint for CSS in demos? - Lowercase `readme.md`, `license`? - Support the `components` prop - Host the demo (https://monaco.mdxjs.com styled consistently with MDX website? Or https://monaco-mdx.js.org analogous to https://monaco-tailwindcss.js.org / https://monaco-unified.js.org / https://monaco-yaml.js.org?) - Publish packages - Identify, test, and fix various corner cases - Support definitions referencing unopened files - #168 - Fix Windows tests - Move extension from project root into subpackage (blocked upstream) - Identify and implement missing TypeScript features - Support unified micromark syntax plugins (`frontmatter`, `gfm`, etc) in the language server - Support unified micromark syntax plugins in Monaco editor - Consider support for remark transformer plugins (`remark-mdx-frontmatter` introduces variables) - Consider support for rehype transformer plugins (`rehype-mdx-title` introduces a variable) - Support loose (invalid) JavaScript syntax Closes #165 (Intellisense is a broad concept. Please open new issues for specific missing features.) Closes #196 (I did use parts of this for inspiration. Thanks @Kingwl!) Closes #223
references:
The text was updated successfully, but these errors were encountered: