Skip to content

Add support for pruner formatter#856

Merged
stevearc merged 2 commits intostevearc:masterfrom
julienvincent:jv/pruner-formatter
Feb 23, 2026
Merged

Add support for pruner formatter#856
stevearc merged 2 commits intostevearc:masterfrom
julienvincent:jv/pruner-formatter

Conversation

@julienvincent
Copy link
Contributor

@julienvincent julienvincent commented Jan 31, 2026

Pruner is a new formatter built by me which adds first-class support for formatting embedded languages. It uses treesitter and language injections to find injected regions and then shells out the the appropriate languages' formatter.

Similar to and inspired by conform.nvim itself!

@github-actions github-actions bot requested a review from stevearc January 31, 2026 11:21
@julienvincent
Copy link
Contributor Author

Ehh, I'm not entirely sure why the typecheck job is failing. It doesn't look like the error is coming from my code.

How can I run this locally? I can't really find instructions.

@stevearc
Copy link
Owner

Awesome! I was initially excited by the possibility of formatting code snippets in embedded sections using conform, but my implementation ended up not working as well as I'd hoped in all cases. Hopefully your solution works better!

@stevearc stevearc merged commit fcd18b1 into stevearc:master Feb 23, 2026
8 checks passed
@julienvincent julienvincent deleted the jv/pruner-formatter branch February 23, 2026 07:44
@julienvincent
Copy link
Contributor Author

Awesome! I was initially excited by the possibility of formatting code snippets in embedded sections using conform, but my implementation ended up not working as well as I'd hoped in all cases. Hopefully your solution works better!

Yea I initially tried to implement my own version of the conform injected formatter to solve some of the problems but it just proved to be very hard to do with Neovim as a base.

Too many editor-geared behaviours that get in the way. This needed to be done in a dedicated binary.

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