diff options
| author | Mayank Dutta <[email protected]> | 2021-07-04 02:43:57 +0530 | 
|---|---|---|
| committer | GitHub <[email protected]> | 2021-07-03 17:13:57 -0400 | 
| commit | 7dc564c42727ac66dea1e9cb795a2568e00e4628 (patch) | |
| tree | a91d4c774bc700e0f32f050b7d59ba0788979662 /ftplugin | |
| parent | 049fd808d9db997f475fbf8a95c0288c90e95176 (diff) | |
added Clangd format_on_save (#621)
* clang autoformat do save lot of trouble
* clang autoformat do save lot of trouble
* clang indentation done, comments updated
* clang indentation done, comments updated
Co-authored-by: Mayank Sharma <[email protected]>
Diffstat (limited to 'ftplugin')
| -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 | 
