summaryrefslogtreecommitdiff
path: root/.config/nvim/lua/overseer/template/custom/cmake_run.lua
diff options
context:
space:
mode:
authorKyren223 <Kyren223@proton.me>2025-05-01 16:59:17 +0300
committerKyren223 <Kyren223@proton.me>2025-05-01 16:59:17 +0300
commitfa73efd6ab83c9ba1434e8e8a0e297315dd679b4 (patch)
tree0c23840876d5f473de2c0f7f00d62fb7369c26c7 /.config/nvim/lua/overseer/template/custom/cmake_run.lua
parent5b6799fa0ef35df1261b1b6715f4a5eebe881596 (diff)
Removed a bunch of unneeded plugins
Diffstat (limited to '.config/nvim/lua/overseer/template/custom/cmake_run.lua')
-rw-r--r--.config/nvim/lua/overseer/template/custom/cmake_run.lua45
1 files changed, 0 insertions, 45 deletions
diff --git a/.config/nvim/lua/overseer/template/custom/cmake_run.lua b/.config/nvim/lua/overseer/template/custom/cmake_run.lua
deleted file mode 100644
index cdb4d5c..0000000
--- a/.config/nvim/lua/overseer/template/custom/cmake_run.lua
+++ /dev/null
@@ -1,45 +0,0 @@
-local overseer = require('overseer')
-local root_pattern = require('lspconfig/util').root_pattern('CMakePresets.json', 'CTestConfig.cmake', 'build', 'cmake')
-return {
- name = 'Run Cmake Project',
- params = {
- args = {
- optional = true,
- type = 'string',
- },
- },
- builder = function(params)
- local filename = vim.fn.expand('%:p')
- local root_dir = root_pattern(filename)
- local exe = vim.g.overseer_cmake_main_exe
-
- -- Make sure params.args is a string
- if not params.args or type(params.args) ~= 'string' then
- params.args = ''
- end
-
- return {
- name = 'Run ' .. exe,
- cmd = './' .. 'Kalc ' .. params.args,
- cwd = root_dir .. '/build',
- }
- end,
- tags = { overseer.TAG.RUN },
- priority = 41,
- condition = {
- callback = function()
- local filename = vim.fn.expand('%:p')
- local root_dir = root_pattern(filename)
- if not root_dir then
- return false, 'Unable to detect root directory of cmake project'
- end
-
- if not vim.g.overseer_cmake_main_exe then
- return false,
- 'Global "overseer_cmake_main_exe" must be defined. use `vim.g.overseer_cmake_main_exe = "Value"` to define it'
- end
-
- return true
- end,
- },
-}