Skip to content

add support for topiary#854

Open
georgeharker wants to merge 5 commits intostevearc:masterfrom
georgeharker:topiary-support
Open

add support for topiary#854
georgeharker wants to merge 5 commits intostevearc:masterfrom
georgeharker:topiary-support

Conversation

@georgeharker
Copy link

Topiary is a tree-sitter based formatter.

I recently opened a PR there to add zsh support.

@github-actions github-actions bot requested a review from stevearc January 23, 2026 22:46
Comment on lines +48 to +51
-- Override the detected language for a specific filetype
-- Example: { language = "bash" }
language = nil,
},
Copy link
Owner

Choose a reason for hiding this comment

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

Instead of having a single override value, I think it would be better to expose the ft_to_language map on the options like we do for the injected formatter

lang_to_ft = {
bash = "sh",
},

That way it's easy for a user to override a particular language opt without clobbering all the others.

We can also fall back to using the raw vim filetype if there is no entry, and that will allow us to remove all the entries where the values are the same. I know that means the condition won't work anymore, but I don't think the condition is that important.

Copy link
Author

Choose a reason for hiding this comment

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

I'm a bit stalled with the topiary folks right now on zsh integration so this is a bit reduced in priority. Can fix as suggested or reopen when / if Zsh integration is done.

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