diff options
author | James Walmsley <[email protected]> | 2021-07-04 02:16:24 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2021-07-03 21:16:24 -0400 |
commit | af3e51eec81b0b6eabd684c77edd1d50d36b8e5b (patch) | |
tree | 63eadf3a46dfdce385e979a5f38844b25ef1023a /ftplugin/c.lua | |
parent | a8ccb55260accf241b7e061f1fd07f8e0a4dbbb6 (diff) |
[LSP] clang - Support autoformat for all file-types. (#634)
Diffstat (limited to 'ftplugin/c.lua')
-rw-r--r-- | ftplugin/c.lua | 10 |
1 files 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 |