mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-02-04 19:00:07 +08:00
32 lines
470 B
Lua
32 lines
470 B
Lua
local M = {}
|
|
|
|
function M.enabled()
|
|
return { 'uncrustify', 'clangformat', 'astyle' }
|
|
end
|
|
|
|
function M.clangformat(opt)
|
|
return {
|
|
exe = 'clang-format',
|
|
args = { '-assume-filename=' .. opt.filepath },
|
|
stdin = true,
|
|
}
|
|
end
|
|
|
|
function M.uncrustify(opt)
|
|
return {
|
|
exe = 'uncrustify',
|
|
args = { '-q', '-l', 'C' },
|
|
stdin = true,
|
|
}
|
|
end
|
|
|
|
function M.astyle(opt)
|
|
return {
|
|
exe = 'astyle',
|
|
args = {'--mode=c'},
|
|
stdin = true
|
|
}
|
|
end
|
|
|
|
return M
|