added clang-tidy task to overseer
This commit is contained in:
parent
1b764b9f0e
commit
efd30083a8
22
lua/overseer/template/user/clang/clang-tidy.lua
Normal file
22
lua/overseer/template/user/clang/clang-tidy.lua
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
return {
|
||||||
|
name = 'clang-tidy',
|
||||||
|
builder = function()
|
||||||
|
-- Full path to current file (see :help expand())
|
||||||
|
local dir = vim.loop.cwd()
|
||||||
|
local file = vim.fn.expand('%:p')
|
||||||
|
return {
|
||||||
|
cmd = { 'clang-tidy' },
|
||||||
|
-- cmd = { 'c:/Users/uid40528/scoop/apps/llvm/current/bin/clang-tidy.exe' },
|
||||||
|
args = { file, '-p', 'build_nvim', '--quiet', '--config-file', dir .. '/.clang-tidy' },
|
||||||
|
cwd = dir,
|
||||||
|
components = {
|
||||||
|
{ 'on_result_diagnostics_quickfix', open = true },
|
||||||
|
{ 'on_output_parse', problem_matcher = '$gcc' },
|
||||||
|
{ 'on_result_diagnostics' },
|
||||||
|
'default' },
|
||||||
|
}
|
||||||
|
end,
|
||||||
|
condition = {
|
||||||
|
filetype = { 'cpp' },
|
||||||
|
},
|
||||||
|
}
|
@ -2,18 +2,32 @@ return {
|
|||||||
'stevearc/overseer.nvim',
|
'stevearc/overseer.nvim',
|
||||||
config = function()
|
config = function()
|
||||||
require('overseer').setup({
|
require('overseer').setup({
|
||||||
templates = { 'builtin', 'user.cmake.cmake' },
|
templates = { 'builtin', 'user.cmake.cmake', 'user.clang.clang-tidy' },
|
||||||
})
|
})
|
||||||
end,
|
end,
|
||||||
keys = {
|
keys = {
|
||||||
{
|
{
|
||||||
'<f4>',
|
'<f4>',
|
||||||
function()
|
function()
|
||||||
require('overseer').open()
|
|
||||||
require('overseer').run_template()
|
require('overseer').run_template()
|
||||||
end,
|
end,
|
||||||
mode = { 'n', 'x' },
|
mode = { 'n', 'x' },
|
||||||
desc = 'Start task (overseer)',
|
desc = 'Start task (overseer)',
|
||||||
},
|
},
|
||||||
|
},
|
||||||
|
cmd = {
|
||||||
|
'OverseerOpen',
|
||||||
|
'OverseerClose',
|
||||||
|
'OverseerToggle',
|
||||||
|
'OverseerSaveBundle',
|
||||||
|
'OverseerLoadBundle',
|
||||||
|
'OverseerDeleteBundle',
|
||||||
|
'OverseerRunCmd',
|
||||||
|
'OverseerRun',
|
||||||
|
'OverseerInfo',
|
||||||
|
'OverseerBuild',
|
||||||
|
'OverseerQuickAction',
|
||||||
|
'OverseerTaskAction',
|
||||||
|
'OverseerClearCache'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user