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

feat(*): add document formatting and code folding providers #41

Merged
merged 4 commits into from
Feb 24, 2025

Conversation

adamdehaven
Copy link
Contributor

@adamdehaven adamdehaven commented Jan 14, 2025

Add MDC language format document provider and code folding provider.

Important

This PR requires publishing the changes in nuxtlabs/monarch-mdc#12 and updating this PR to pull in the latest version of @nuxtlabs/monarch-mdc

I'm utilizing the exported formatter and getDocumentFoldingRanges functions from the @nuxtlabs/monarch-mdc package in this PR in order to source the MDC formatting and folding logic from a single source of truth rather than replicating the code here since it's isomorphic.

This PR depends on nuxtlabs/monarch-mdc#12 to
export a cjs build in order to consume the formatter from a single
source of truth.
@adamdehaven adamdehaven marked this pull request as draft January 14, 2025 05:53
@adamdehaven
Copy link
Contributor Author

The formatter here also only supports spaces at this time.

Should we detect tabs and disable (or something), or what's the preferred behavior?

@adamdehaven adamdehaven marked this pull request as ready for review January 30, 2025 19:54
@adamdehaven adamdehaven marked this pull request as draft January 30, 2025 19:54
@adamdehaven adamdehaven marked this pull request as ready for review February 13, 2025 15:14
Copy link
Collaborator

@farnabaz farnabaz left a comment

Choose a reason for hiding this comment

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

Great work 🔥

@farnabaz farnabaz merged commit 866de6e into nuxtlabs:main Feb 24, 2025
@adamdehaven adamdehaven deleted the feat/formatter-and-code-folding branch February 24, 2025 13:44
@adamdehaven
Copy link
Contributor Author

@farnabaz I forgot to add anything in the README from this 🤦🏼

Also, do you know what it takes to trigger a release for the VS Code extension?

Copy link
Collaborator

No worries, we can add it before release, happy to open a PR? :)

I'll release a new version this evening

@adamdehaven
Copy link
Contributor Author

@farnabaz here you go: #44

@adamdehaven
Copy link
Contributor Author

Any idea when the release will ship?

Copy link
Collaborator

There is an issue with built version, folding seems not working. I'll release after fixing it

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.

2 participants