Removed a bunch of unneeded plugins
This commit is contained in:
@@ -1,25 +0,0 @@
|
||||
local overseer = require('overseer')
|
||||
local root_pattern = require('lspconfig/util').root_pattern('CMakePresets.json', 'CTestConfig.cmake', 'build', 'cmake')
|
||||
return {
|
||||
name = 'Build Cmake Project',
|
||||
builder = function(_)
|
||||
local filename = vim.fn.expand('%:p')
|
||||
local root_dir = root_pattern(filename) or vim.fn.getcwd()
|
||||
local args = vim.g.overseer_cmake_extra_args or ''
|
||||
|
||||
return {
|
||||
name = 'Cmake',
|
||||
cmd = 'cmake ' .. args .. ' .. && cmake --build .',
|
||||
cwd = root_dir .. '/build',
|
||||
}
|
||||
end,
|
||||
tags = { overseer.TAG.BUILD },
|
||||
priority = 40,
|
||||
condition = {
|
||||
callback = function()
|
||||
local filename = vim.fn.expand('%:p')
|
||||
local root_dir = root_pattern(filename)
|
||||
return root_dir ~= nil
|
||||
end,
|
||||
},
|
||||
}
|
||||
@@ -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,
|
||||
},
|
||||
}
|
||||
@@ -1,28 +0,0 @@
|
||||
local overseer = require('overseer')
|
||||
local root_pattern = require('lspconfig/util').root_pattern('CMakePresets.json', 'CTestConfig.cmake', 'build', 'cmake')
|
||||
return {
|
||||
name = 'Test Cmake Project',
|
||||
builder = function(_)
|
||||
local filename = vim.fn.expand('%:p')
|
||||
local root_dir = root_pattern(filename)
|
||||
|
||||
return {
|
||||
name = 'Cmake Tests',
|
||||
cmd = 'ctest --output-on-failure',
|
||||
cwd = root_dir .. '/build',
|
||||
}
|
||||
end,
|
||||
tags = { overseer.TAG.TEST },
|
||||
priority = 42,
|
||||
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
|
||||
|
||||
return true
|
||||
end,
|
||||
},
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
return {
|
||||
'custom.make_c_file',
|
||||
'custom.cmake_build',
|
||||
'custom.cmake_run',
|
||||
'custom.cmake_test',
|
||||
}
|
||||
@@ -1,33 +0,0 @@
|
||||
local overseer = require('overseer')
|
||||
return {
|
||||
name = 'Make Current C file',
|
||||
builder = function(_)
|
||||
local path = vim.fn.expand('%:p')
|
||||
local dir, file = path:gmatch('(.*)[/\\](.*)')()
|
||||
file = string.sub(file, 1, -3) -- remove .c extension
|
||||
|
||||
return {
|
||||
cmd = { 'make' },
|
||||
args = { file },
|
||||
cwd = dir,
|
||||
}
|
||||
end,
|
||||
tags = { overseer.TAG.BUILD },
|
||||
priority = 50,
|
||||
condition = {
|
||||
filetype = { 'c' },
|
||||
callback = function()
|
||||
-- Disable if already using make/cmake
|
||||
local filename = vim.fn.expand('%:p')
|
||||
local root_dir = require('lspconfig/util').root_pattern(
|
||||
'Makefile',
|
||||
'build/Makefile',
|
||||
'CMakePresets.json',
|
||||
'CTestConfig.cmake',
|
||||
'build',
|
||||
'cmake'
|
||||
)(filename)
|
||||
return root_dir == nil
|
||||
end,
|
||||
},
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
return {
|
||||
'OXY2DEV/helpview.nvim',
|
||||
lazy = false,
|
||||
lazy = false, -- already lazy loaded
|
||||
ft = 'help',
|
||||
dependencies = {
|
||||
'nvim-treesitter/nvim-treesitter',
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
return {
|
||||
'danymat/neogen',
|
||||
keys = { { '<leader>ng', '<<cmd>Neogen<cr>', desc = '[N]eo[G]en' } },
|
||||
opts = { snippet_engine = 'luasnip' },
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
return {
|
||||
-- NOTE: No keybindings, use `:Spectre` or `:Spectre <file>`
|
||||
-- Spectre has no undo, so it should be rarely used, which is why no keybindings are defined
|
||||
'nvim-pack/nvim-spectre',
|
||||
cmd = 'Spectre',
|
||||
config = true,
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
return {
|
||||
'pwntester/octo.nvim',
|
||||
cmd = 'Octo',
|
||||
dependencies = { 'nvim-telescope/telescope.nvim' },
|
||||
keys = {
|
||||
{ '<leader>gi', '<cmd>Octo issue search<cr>', desc = '[G]ithub [I]ssues (local)' },
|
||||
{ '<leader>pr', '<cmd>Octo pr search<cr>', desc = 'Github [PR]s (local)' },
|
||||
|
||||
@@ -1,49 +0,0 @@
|
||||
return {
|
||||
'stevearc/overseer.nvim',
|
||||
-- NOTE: without telescope the UI is not custom, so making sure telescope is loaded first
|
||||
dependencies = { 'nvim-telescope/telescope.nvim' },
|
||||
-- event = 'VeryLazy',
|
||||
keys = function()
|
||||
local overseer = require('overseer')
|
||||
local RUN_TAG = overseer.TAG.RUN
|
||||
local BUILD_TAG = overseer.TAG.BUILD
|
||||
local TEST_TAG = overseer.TAG.TEST
|
||||
local function run_template(tag, show_prompt)
|
||||
return function()
|
||||
local prompt = show_prompt and 'always' or 'avoid'
|
||||
overseer.run_template({ tags = { tag }, first = true, prompt = prompt })
|
||||
-- overseer.open({ enter = false }) -- don't focus
|
||||
end
|
||||
end
|
||||
return {
|
||||
{ '<leader>or', run_template(RUN_TAG, false), desc = '[O]verseer [R]un' },
|
||||
{ '<leader>oR', run_template(RUN_TAG, true), desc = '[O]verseer [R]un (with params)' },
|
||||
|
||||
{ '<leader>ob', run_template(BUILD_TAG, false), desc = '[O]verseer [B]uild' },
|
||||
{ '<leader>oB', run_template(BUILD_TAG, true), desc = '[O]verseer [B]uild (with params)' },
|
||||
|
||||
{ '<leader>ot', run_template(TEST_TAG, false), desc = '[O]verseer [T]est' },
|
||||
{ '<leader>oT', run_template(TEST_TAG, true), desc = '[O]verseer [T]est (with params)' },
|
||||
|
||||
{ '<leader>ow', '<cmd>OverseerToggle!<cr>', desc = '[O]verseer [W]indow (toggle)' },
|
||||
{ '<leader>oW', '<cmd>OverseerQuickAction open float<cr>', desc = '[O]verseer [W]indow (terminal float)' },
|
||||
}
|
||||
end,
|
||||
opts = {
|
||||
templates = { 'builtin', 'custom' },
|
||||
task_list = {
|
||||
min_height = 0.5,
|
||||
bindings = {
|
||||
['o'] = false,
|
||||
['<C-v>'] = false,
|
||||
['<C-s>'] = false,
|
||||
['<C-h>'] = false,
|
||||
['<C-j>'] = false,
|
||||
['<C-k>'] = false,
|
||||
['<C-l>'] = false,
|
||||
['<C-u>'] = 'ScrollOutputUp',
|
||||
['<C-d>'] = 'ScrollOutputDown',
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
Reference in New Issue
Block a user