From af3e51eec81b0b6eabd684c77edd1d50d36b8e5b Mon Sep 17 00:00:00 2001 From: James Walmsley Date: Sun, 4 Jul 2021 02:16:24 +0100 Subject: [LSP] clang - Support autoformat for all file-types. (#634) --- ftplugin/c.lua | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ftplugin/c.lua b/ftplugin/c.lua index d5436315..a2324986 100644 --- a/ftplugin/c.lua +++ b/ftplugin/c.lua @@ -23,9 +23,9 @@ require'lspconfig'.clangd.setup { if O.lang.clang.autoformat then require('lv-utils').define_augroups({ _clang_autoformat = { - { - 'BufWritePre *.cpp lua vim.lsp.buf.formatting_sync(nil,1000)' - - } - } }) + {'BufWritePre *.c lua vim.lsp.buf.formatting_sync(nil,1000)'}, + {'BufWritePre *.h lua vim.lsp.buf.formatting_sync(nil,1000)'}, + {'BufWritePre *.cpp lua vim.lsp.buf.formatting_sync(nil,1000)'}, + {'BufWritePre *.hpp lua vim.lsp.buf.formatting_sync(nil,1000)'}, + }}) end -- cgit v1.2.3