Skip to content

Org support#93

Merged
jacksonrayhamilton merged 9 commits into
prettier:masterfrom
jacksonrayhamilton:prettier-js-prettify-code-block
Jul 4, 2025
Merged

Org support#93
jacksonrayhamilton merged 9 commits into
prettier:masterfrom
jacksonrayhamilton:prettier-js-prettify-code-block

Conversation

@jacksonrayhamilton
Copy link
Copy Markdown
Collaborator

@jacksonrayhamilton jacksonrayhamilton commented Jul 4, 2025

Now that we have support for formatting ranges of text in the buffer (#92), I used that to implement formatting of code blocks in org-mode.

You can simply do M-x prettier-js-prettify to format all the code blocks in an Org buffer; it will only format ones that Prettier can format.

You also move point inside a code block and do M-x prettier-js-prettify-code-block to format that one code block.

Fixes: #38

Demo

prettier-js-prettify-code-block.mov
All.supported.languages.mov

@jacksonrayhamilton jacksonrayhamilton merged commit 79e045c into prettier:master Jul 4, 2025
12 checks passed
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.

Unable to run in the org mode source code block

2 participants