diff options
Diffstat (limited to 'ftplugin/c.lua')
-rw-r--r-- | ftplugin/c.lua | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/ftplugin/c.lua b/ftplugin/c.lua index 8a7ef9fd..d5436315 100644 --- a/ftplugin/c.lua +++ b/ftplugin/c.lua @@ -19,3 +19,13 @@ 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)' + + } + } }) +end |