Skip to content

Possible unintended behavior in Conform's opts format_on_save #1395

Merged
feoh merged 1 commit into
nvim-lua:masterfrom
RulentWave:master
Mar 24, 2025
Merged

Possible unintended behavior in Conform's opts format_on_save #1395
feoh merged 1 commit into
nvim-lua:masterfrom
RulentWave:master

Conversation

@RulentWave

Copy link
Copy Markdown
Contributor

This pull request changes Conform's format_on_save lambda so that buffers that match disable_filetypes return nil instead of a table with the lsp_format entry equaling "never". This allows you to enable a formatter for langages in the disable_filetypes table to have a formatter that can be run manually with Leader-f but doesn't enable format_on_save for them. Before this change, if you add a formatter for a language such as c, like clang-format, it enables format_on_save since the formatter is set explicitly. I think this probably isn't the intended behavior but in case it is, feel free to reject this PR.

Loading
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