diff options
author | christianchiarulli <[email protected]> | 2021-07-03 23:46:16 -0400 |
---|---|---|
committer | christianchiarulli <[email protected]> | 2021-07-03 23:46:16 -0400 |
commit | ddc0c71dae44aaf39742201704c22f9cf92073de (patch) | |
tree | 2ba85288d1ae1997ac55b70ad36330b3036b75b0 /ftplugin/c.lua | |
parent | 8f37e7f2784b56d918f64960fd7b5c02947904f4 (diff) | |
parent | 632e7bf19418e5792538bbedb602b1e10215fa52 (diff) |
Merge branch 'master' of github.com:ChristianChiarulli/LunarVim into stable
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..a2324986 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 *.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 |