Intellisense for code blocks? #2429
Unanswered
lucastobrazil
asked this question in
Ideas
Replies: 1 comment 5 replies
-
I think you means this? import { MyTypedComponent } from '../components/MyTypedComponent.js'
# My MDX File
<MyTypedComponent foo="bar" /> // intellisense works
```jsx
<MyTypedComponent foo="bar" /> // intellisense doesn't work but should
~~~~ // squiggly lines from eslint would also be helpful
``` I have fiddled with that, but it’s a complex feature. Support tracked in mdx-js/mdx-analyzer#287. |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Would be cool to be able to get intellisense for code blocks too. Even though they may be rendered as strings in the output, whilst writing code blocks it would be very useful to know that the code blocks are using the right types (and eslinted too)
For context, we're using MDX for a component library documentation site (Build with Gatsby 5) with editable code snippets. See https://www.vitalitydesignsystem.com/components/avatar/ as an example,
In order to render the editable code (uses React-Live under the hood), we need to place all the code blocks in back ticks, so ideally Intellisense can also read within those code blocks too.
If i understand correctly, MDX renders the code blocks as a string, so perhaps intellisense cannot process them... But i'd hope for something like:
Beta Was this translation helpful? Give feedback.
All reactions