Skip to content
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

Intellisense not working #8

Open
selrond opened this issue Jan 9, 2019 · 11 comments
Open

Intellisense not working #8

selrond opened this issue Jan 9, 2019 · 11 comments
Labels
enhancement New feature or request

Comments

@selrond
Copy link

selrond commented Jan 9, 2019

Would it be possible to have intellisense for javascript and markdown inside .mdx files? It would require custom rules / config probably. I'm not aware how it works though...

@silvenon silvenon added the enhancement New feature or request label Jan 9, 2019
@silvenon
Copy link
Owner

silvenon commented Jan 9, 2019

Hopefully. I'm very new to VS Code hacking, but I'll give it a shot some time.

@chrispaynter
Copy link

Yeah this would be a great addition to the plugin.

I appreciate the effort it would require to make it possible.

I wish I had free time to contribute to this, as I think intellisense support will become crucial as MDX uptake increases with Storybook.

I'm already heavily missing it, but the plugin as is has helped my workflow a lot already, so thank you.

@silvenon
Copy link
Owner

Thank you for the kind words, and I totally agree, MDX is going places.

Btw, I just want everyone to know that the inactivity in this repo is only temporary, I'm still heavily using it and I plan to make it much better.

@piotrpalek
Copy link

Does "intellisense" also include stuff like "import autocomplete"? Currently it's hard to import things into .mdx files, because no popup shows up to assist in importing.

@riceboyler
Copy link

For me, I think v1 of intellisense would be just pulling in things like props, etc. For example, if I do <Grid justifyContent="" /> using MUI, it'd be nice if it gave me available options for justifyContent.

@remorses
Copy link

remorses commented Jun 6, 2020

The html implementation for script tags could be a starting point
https://github.com/microsoft/vscode/blob/8f08c2ffa75e9ca53ac8ef67ff023feeb94fe5fc/extensions/html-language-features/server/src/modes/javascriptMode.ts

The idea is to convert the current MDX file to a js file, converting everything that is not js to an empty line (this way maintaining the typescript rages correct), then send it to the typescript language server host to get the completion results

@silvenon
Copy link
Owner

silvenon commented Jun 6, 2020

Thanks for the tip!

@karlhorky
Copy link

karlhorky commented Jul 1, 2020

I guess @remorses tip also mirrors the comment from @mjbvz here: microsoft/vscode#92805 (comment)

Another thing mentioned over there is that vuejs/vetur is also a really good reference for doing this.

And also, that "this won't be easy" :)

@jasongerbes
Copy link

Hey, any updates on this feature request?

@adueck
Copy link

adueck commented Jan 21, 2021

Friendly ping to @silvenon 🛎 ... sorry to bug you but wondering if this is still in the works. This would be a huuuge help if it were available. I have a project where I'm writing MDX content with react components that take complicated props. It would be fantastic to get autocomplete / type-checking on the props.

This is a blog post with some text... now I'll show you my **interactive component**

<InteractiveThing aPropWhatGoesHereIForget={"help!"} />

@karlhorky
Copy link

Seems like this is also an issue over at mdx-js/vscode-mdx, which seems like it could be possibly more regularly maintained:

mdx-js/mdx-analyzer#165

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

9 participants