Skip to content

feature request: a new formatter for Vim's own C-indenting #555

@heygarrett

Description

@heygarrett

Did you check existing requests?

  • I have searched the existing issues

Describe the feature

Vim and Neovim have built-in functionality for indenting C-style programs:
https://neovim.io/doc/user/indent.html#_1.-indenting-c-style-programs

It would be awesome to be able to use this as a formatter like any other in Conform.

Provide background

All of the common C formatters have too many configuration options. As someone who only dabbles with C on occasion, Vim's built-in C-indenting is more than enough for my needs. But I'd love to have it trigger on save rather than running it manually (eg, visually selecting the whole file then hitting =). And having it set up as a formatter in Conform would mean not needing to duplicate format-on-save logic. It would also be great to use the formatter's condition property to check for a .clang-format file and fall back to clangd if it finds one.

What is the significance of this feature?

nice to have

Additional details

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions