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

Auto complete of props in MDC #24

Open
Atinux opened this issue Jun 16, 2022 · 4 comments
Open

Auto complete of props in MDC #24

Atinux opened this issue Jun 16, 2022 · 4 comments
Labels
enhancement New feature or request

Comments

@Atinux
Copy link
Member

Atinux commented Jun 16, 2022

It would be great to have the possibility to support the autocompletion of props in the editor.

@Atinux Atinux added the enhancement New feature or request label Jun 16, 2022
Copy link
Member Author

Atinux commented Sep 14, 2022

I guess we could leverage something similar to what @Tahul has done in Pinceau: https://github.com/Tahul/pinceau/blob/main/volar/index.js

By using nuxt-component-meta under the hood?

@mrwwalmsley
Copy link

I was wanting to implement autocomplete for my React project at work.
I was planning to have auto complete of props as well as directive names by reading the filenames of MDC directive components.

Would it be possible to have a configuration file that can specify all the props available for each directive so that this could work in a React as well as Vue project?

Copy link
Member Author

Atinux commented Oct 19, 2022

Did you make the MDC works with React @mrwwalmsley ?

@mrwwalmsley
Copy link

mrwwalmsley commented Nov 17, 2022

Yes, we have been using MDC in a React project for a couple of years -- we extended Remark's MDC implementation.

We had own custom editor & syntax highlighting that was not as good as the Nuxt3 syntax highlighter. When Nuxt3 added MDC I started upgrading my Nuxt side projects from Nuxt2 to Nuxt3 using MDC. After that we started testing the Nuxt plugin for writing our React content in VsCode.

Our MDC implementation has a bunch of custom extensions such as include and define statements:

:::define[template_name]
Hello {{name}}!
:::

:::include[template_name]
name='Mike'
:::

:::include[template_name]
name='Sebastian'
:::

If the includes are not defined locally, then they are loaded from our content DB.

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

2 participants