Change directory structure
This commit is contained in:
28
nvim/lua/overseer/template/user/cmake_build.lua
Normal file
28
nvim/lua/overseer/template/user/cmake_build.lua
Normal file
@@ -0,0 +1,28 @@
|
||||
return {
|
||||
name = "CMake Build",
|
||||
builder = function()
|
||||
local file = vim.fn.expand("%:p")
|
||||
return {
|
||||
cmd = {
|
||||
"cmake"
|
||||
},
|
||||
args = {
|
||||
"--build",
|
||||
"build",
|
||||
"-j16"
|
||||
},
|
||||
components = {
|
||||
{
|
||||
"on_output_quickfix"
|
||||
},
|
||||
"default"
|
||||
}
|
||||
}
|
||||
end,
|
||||
condition = {
|
||||
filetype = {
|
||||
"cmake",
|
||||
"cpp"
|
||||
}
|
||||
}
|
||||
}
|
||||
24
nvim/lua/overseer/template/user/cmake_clean.lua
Normal file
24
nvim/lua/overseer/template/user/cmake_clean.lua
Normal file
@@ -0,0 +1,24 @@
|
||||
return {
|
||||
name = "CMake Clean",
|
||||
builder = function()
|
||||
local file = vim.fn.expand("%:p")
|
||||
return {
|
||||
cmd = {
|
||||
"rm"
|
||||
},
|
||||
args = {
|
||||
"-r",
|
||||
"build",
|
||||
},
|
||||
components = {
|
||||
"default"
|
||||
}
|
||||
}
|
||||
end,
|
||||
condition = {
|
||||
filetype = {
|
||||
"cmake",
|
||||
"cpp"
|
||||
}
|
||||
}
|
||||
}
|
||||
58
nvim/lua/overseer/template/user/cmake_generate.lua
Normal file
58
nvim/lua/overseer/template/user/cmake_generate.lua
Normal file
@@ -0,0 +1,58 @@
|
||||
return {
|
||||
name = "CMake Generate",
|
||||
params = {
|
||||
build_type = {
|
||||
type = "enum",
|
||||
choices = {
|
||||
"Debug",
|
||||
"Release",
|
||||
"RelWithDebInfo",
|
||||
"MinSizeRel"
|
||||
},
|
||||
default = "Debug"
|
||||
},
|
||||
generator = {
|
||||
type = "enum",
|
||||
choices = {
|
||||
"Ninja",
|
||||
"Unix Makefiles"
|
||||
},
|
||||
default = "Ninja"
|
||||
},
|
||||
compiler = {
|
||||
type = "enum",
|
||||
choices = {
|
||||
"g++",
|
||||
"clang++"
|
||||
},
|
||||
default = "g++"
|
||||
}
|
||||
},
|
||||
builder = function(params)
|
||||
return {
|
||||
cmd = {
|
||||
"cmake"
|
||||
},
|
||||
args = {
|
||||
"-B",
|
||||
"build",
|
||||
"-S",
|
||||
".",
|
||||
"-DCMAKE_EXPORT_COMPILE_COMMANDS=ON",
|
||||
"-DCMAKE_BUILD_TYPE=" .. params.build_type,
|
||||
"-DCMAKE_CXX_COMPILER=" .. params.compiler,
|
||||
"-G",
|
||||
params.generator
|
||||
},
|
||||
components = {
|
||||
"default"
|
||||
}
|
||||
}
|
||||
end,
|
||||
condition = {
|
||||
filetype = {
|
||||
"cmake",
|
||||
"cpp"
|
||||
}
|
||||
}
|
||||
}
|
||||
27
nvim/lua/overseer/template/user/cmake_test.lua
Normal file
27
nvim/lua/overseer/template/user/cmake_test.lua
Normal file
@@ -0,0 +1,27 @@
|
||||
return {
|
||||
name = "CMake Test",
|
||||
builder = function()
|
||||
return {
|
||||
cmd = {
|
||||
"ctest"
|
||||
},
|
||||
args = {
|
||||
"--test-dir",
|
||||
"build",
|
||||
"--output-on-failure",
|
||||
},
|
||||
components = {
|
||||
{
|
||||
"on_output_quickfix"
|
||||
},
|
||||
"default"
|
||||
}
|
||||
}
|
||||
end,
|
||||
condition = {
|
||||
filetype = {
|
||||
"cmake",
|
||||
"cpp"
|
||||
}
|
||||
}
|
||||
}
|
||||
22
nvim/lua/overseer/template/user/python_run.lua
Normal file
22
nvim/lua/overseer/template/user/python_run.lua
Normal file
@@ -0,0 +1,22 @@
|
||||
return {
|
||||
name = "Python Run",
|
||||
builder = function()
|
||||
local file = vim.fn.expand("%:p")
|
||||
return {
|
||||
cmd = {
|
||||
"python"
|
||||
},
|
||||
args = {
|
||||
file
|
||||
},
|
||||
components = {
|
||||
"default"
|
||||
}
|
||||
}
|
||||
end,
|
||||
condition = {
|
||||
filetype = {
|
||||
"python"
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user