Skip to content

feat(extension): metadata autocompletion #143

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

Merged
merged 12 commits into from
Jul 25, 2024
Merged

Conversation

Nemikolh
Copy link
Member

@Nemikolh Nemikolh commented Jul 16, 2024

This PR adds a volar based language server to provide autocompletion in the metadata of markdown and mdx files.

All the describe properties are here to provide a description for each property.

The autocompletion features is entirely provided by the Yaml language server.

TutorialKit-metadata-intellisense.webm

Copy link

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@Nemikolh Nemikolh force-pushed the joan/frontmatter-completions branch from c3dbda2 to 63ece9e Compare July 16, 2024 07:32
Copy link

cloudflare-workers-and-pages bot commented Jul 16, 2024

Deploying tutorialkit-demo-page with  Cloudflare Pages  Cloudflare Pages

Latest commit: 0966dcf
Status: ✅  Deploy successful!
Preview URL: https://f0c04146.tutorialkit-demo-page.pages.dev
Branch Preview URL: https://joan-frontmatter-completions.tutorialkit-demo-page.pages.dev

View logs

@Nemikolh Nemikolh mentioned this pull request Jul 16, 2024
29 tasks
@Nemikolh Nemikolh force-pushed the joan/extensions-ci-and-tiny-fixues branch from aff6bbe to 95e8acf Compare July 17, 2024 13:18
Base automatically changed from joan/extensions-ci-and-tiny-fixues to main July 17, 2024 13:25
@Nemikolh Nemikolh force-pushed the joan/frontmatter-completions branch from 7005e34 to 1d4cfa1 Compare July 17, 2024 13:33
@Nemikolh Nemikolh marked this pull request as ready for review July 17, 2024 13:53
@Nemikolh Nemikolh requested a review from AriPerkkio July 17, 2024 15:13
Comment on lines 31 to 34
// TODO: those don't work
'src/content/*.md',
'src/content/**/*.md',
'src/content/**/*.mdx',
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I still need to investigate that, ideally I don't want the check to apply to every markdown & mdx files.

},
});

delete yamlService.capabilities.codeLensProvider;
Copy link
Member Author

@Nemikolh Nemikolh Jul 17, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I removed that because otherwise the schema was popping up on each file metadata. It wasn't a really great UX.

Copy link

cloudflare-workers-and-pages bot commented Jul 19, 2024

Deploying tutorialkit-docs-page with  Cloudflare Pages  Cloudflare Pages

Latest commit: 0966dcf
Status: ✅  Deploy successful!
Preview URL: https://7f829b4a.tutorialkit-docs-page.pages.dev
Branch Preview URL: https://joan-frontmatter-completions.tutorialkit-docs-page.pages.dev

View logs

Copy link
Member

@AriPerkkio AriPerkkio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested this locally and it works really nice, like magic! 🪄

The code itself looks fine to me. I haven't used Volar before but the integration looks clear. @d3lm do you want to take a look at this before I merge this?

@d3lm
Copy link
Contributor

d3lm commented Jul 19, 2024

Yep can take a look if you want 👍

Copy link
Contributor

@d3lm d3lm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work! Left a few minor remarks. Since @Nemikolh is OOO this week, do you wanna take a stab at the comments @AriPerkkio or do we wanna wait?

@AriPerkkio
Copy link
Member

Since @Nemikolh is OOO this week, do you wanna take a stab at the comments @AriPerkkio or do we wanna wait?

I'll handle the PR comments next. 👍

Copy link
Contributor

@d3lm d3lm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Last small remarks but looking good!

@AriPerkkio
Copy link
Member

Tested extension manually after the latest changes. Works OK. ✅

Copy link
Contributor

@d3lm d3lm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🔥

@AriPerkkio AriPerkkio merged commit be0a096 into main Jul 25, 2024
11 checks passed
@AriPerkkio AriPerkkio deleted the joan/frontmatter-completions branch July 25, 2024 12:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants