Closed davidzchen closed 7 months ago
Never mind. Looks like this is a feature specific to formatters: https://stackoverflow.com/questions/33258159/how-to-make-clang-format-skip-sections-of-c-code
Yes exactly. For example clang-format does support clang-format off
directives: https://clang.llvm.org/docs/ClangFormatStyleOptions.html#clang-format-style-options. YMMV with different formatters.
You're not going to want to embed formatting rules in anything specific to a vim plugin because they'd be blown away when you format the file outside vim.
OTOH, #9 to format lines more selectively could be helpful here to not have the formatter fighting you quite so aggressively when you are unlucky enough to be fighting the formatter.
Are there annotations that can be added to the code to omit certain lines from autoformatting?