Add more plugins; Readd overseer templates
This commit is contained in:
parent
de2734ba98
commit
8ace6f1d1c
@ -1,2 +1,3 @@
|
||||
require('set')
|
||||
require('plugins')
|
||||
require('keymaps')
|
||||
|
||||
25
nvim/.config/nvim/lua/overseer/template/user/cargo_build.lua
Normal file
25
nvim/.config/nvim/lua/overseer/template/user/cargo_build.lua
Normal file
@ -0,0 +1,25 @@
|
||||
return {
|
||||
name = "Cargo Build",
|
||||
builder = function()
|
||||
local file = vim.fn.expand("%:p")
|
||||
return {
|
||||
cmd = {
|
||||
"cargo"
|
||||
},
|
||||
args = {
|
||||
"build"
|
||||
},
|
||||
components = {
|
||||
{
|
||||
"on_output_quickfix"
|
||||
},
|
||||
"default"
|
||||
}
|
||||
}
|
||||
end,
|
||||
condition = {
|
||||
filetype = {
|
||||
"rust",
|
||||
}
|
||||
}
|
||||
}
|
||||
22
nvim/.config/nvim/lua/overseer/template/user/cargo_clean.lua
Normal file
22
nvim/.config/nvim/lua/overseer/template/user/cargo_clean.lua
Normal file
@ -0,0 +1,22 @@
|
||||
return {
|
||||
name = "Cargo Clean",
|
||||
builder = function()
|
||||
local file = vim.fn.expand("%:p")
|
||||
return {
|
||||
cmd = {
|
||||
"cargo"
|
||||
},
|
||||
args = {
|
||||
"clean",
|
||||
},
|
||||
components = {
|
||||
"default"
|
||||
}
|
||||
}
|
||||
end,
|
||||
condition = {
|
||||
filetype = {
|
||||
"rust",
|
||||
}
|
||||
}
|
||||
}
|
||||
22
nvim/.config/nvim/lua/overseer/template/user/cargo_run.lua
Normal file
22
nvim/.config/nvim/lua/overseer/template/user/cargo_run.lua
Normal file
@ -0,0 +1,22 @@
|
||||
return {
|
||||
name = "Cargo Run",
|
||||
builder = function()
|
||||
local file = vim.fn.expand("%:p")
|
||||
return {
|
||||
cmd = {
|
||||
"cargo"
|
||||
},
|
||||
args = {
|
||||
"run"
|
||||
},
|
||||
components = {
|
||||
"default"
|
||||
}
|
||||
}
|
||||
end,
|
||||
condition = {
|
||||
filetype = {
|
||||
"rust"
|
||||
}
|
||||
}
|
||||
}
|
||||
24
nvim/.config/nvim/lua/overseer/template/user/cargo_test.lua
Normal file
24
nvim/.config/nvim/lua/overseer/template/user/cargo_test.lua
Normal file
@ -0,0 +1,24 @@
|
||||
return {
|
||||
name = "Cargo Test",
|
||||
builder = function()
|
||||
return {
|
||||
cmd = {
|
||||
"cargo"
|
||||
},
|
||||
args = {
|
||||
"test",
|
||||
},
|
||||
components = {
|
||||
{
|
||||
"on_output_quickfix"
|
||||
},
|
||||
"default"
|
||||
}
|
||||
}
|
||||
end,
|
||||
condition = {
|
||||
filetype = {
|
||||
"rust",
|
||||
}
|
||||
}
|
||||
}
|
||||
28
nvim/.config/nvim/lua/overseer/template/user/cmake_build.lua
Normal file
28
nvim/.config/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/.config/nvim/lua/overseer/template/user/cmake_clean.lua
Normal file
24
nvim/.config/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"
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,58 @@
|
||||
return {
|
||||
name = "CMake Generate",
|
||||
params = {
|
||||
build_type = {
|
||||
type = "enum",
|
||||
choices = {
|
||||
"Debug",
|
||||
"Release",
|
||||
"RelWithDebInfo",
|
||||
"MinSizeRel"
|
||||
},
|
||||
default = "Release"
|
||||
},
|
||||
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/.config/nvim/lua/overseer/template/user/cmake_test.lua
Normal file
27
nvim/.config/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/.config/nvim/lua/overseer/template/user/python_run.lua
Normal file
22
nvim/.config/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"
|
||||
}
|
||||
}
|
||||
}
|
||||
28
nvim/.config/nvim/lua/plugins/noice.lua
Normal file
28
nvim/.config/nvim/lua/plugins/noice.lua
Normal file
@ -0,0 +1,28 @@
|
||||
vim.pack.add({
|
||||
{ src = "https://github.com/MunifTanjim/nui.nvim" },
|
||||
{ src = "https://github.com/folke/noice.nvim" }
|
||||
})
|
||||
|
||||
require("noice").setup({
|
||||
messages = { enabled = false },
|
||||
views = {
|
||||
cmdline_popup = {
|
||||
backend = "popup",
|
||||
relative = "editor",
|
||||
position = {
|
||||
row = -1,
|
||||
col = "0%"
|
||||
},
|
||||
border = {
|
||||
style = "none"
|
||||
}
|
||||
},
|
||||
cmdline_popupmenu = {
|
||||
relative = "editor",
|
||||
position = {
|
||||
row = -2,
|
||||
col = "0%"
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
22
nvim/.config/nvim/lua/plugins/overseer.lua
Normal file
22
nvim/.config/nvim/lua/plugins/overseer.lua
Normal file
@ -0,0 +1,22 @@
|
||||
vim.pack.add({
|
||||
{ src = "https://github.com/stevearc/overseer.nvim", version = "v1.6.0" }
|
||||
})
|
||||
|
||||
require("overseer").setup({
|
||||
templates = {
|
||||
"user.cargo_build",
|
||||
"user.cargo_clean",
|
||||
"user.cargo_run",
|
||||
"user.cargo_test",
|
||||
"user.cmake_generate",
|
||||
"user.cmake_build",
|
||||
"user.cmake_clean",
|
||||
"user.cmake_test",
|
||||
"user.python_run"
|
||||
}
|
||||
})
|
||||
|
||||
vim.keymap.set("n", "<leader>oo", function() require("overseer").toggle() end, { desc = "Toggle" })
|
||||
vim.keymap.set("n", "<leader>or", ":OverseerRun<CR>", { desc = "Run" })
|
||||
vim.keymap.set("n", "<leader>oq", ":OverseerQuickAction<CR>", { desc = "Quick Action" })
|
||||
vim.keymap.set("n", "<leader>of", ":OverseerQuickAction open float<CR>", { desc = "Open Float" })
|
||||
@ -1,17 +1,26 @@
|
||||
vim.pack.add({
|
||||
{
|
||||
src = "https://github.com/nvim-lua/plenary.nvim"
|
||||
},
|
||||
{
|
||||
src = "https://github.com/nvim-telescope/telescope.nvim"
|
||||
}
|
||||
{ src = "https://github.com/nvim-lua/plenary.nvim" },
|
||||
{ src = "https://github.com/nvim-telescope/telescope.nvim" },
|
||||
{ src = "https://github.com/nvim-telescope/telescope-ui-select.nvim" }
|
||||
})
|
||||
|
||||
vim.pack.add({})
|
||||
|
||||
vim.keymap.set('n', '<leader>ff', function() require("telescope.builtin").find_files() end, { desc = "Files" })
|
||||
vim.keymap.set('n', '<leader>fg', function() require("telescope.builtin").live_grep() end, { desc = "grep" })
|
||||
vim.keymap.set('n', '<leader>fa', function() require("telescope.builtin").find_files({ hidden = true }) end, { desc = "All files" })
|
||||
vim.keymap.set('n', '<leader>fa', function() require("telescope.builtin").find_files({ hidden = true }) end,
|
||||
{ desc = "All files" })
|
||||
|
||||
vim.keymap.set('n', '<leader>fb', function() require("telescope.builtin").buffers() end, { desc = "Buffers" })
|
||||
vim.keymap.set('n', '<leader>fh', function() require("telescope.builtin").help_tags() end, { desc = "Help tags" })
|
||||
|
||||
-- require("telescope").setup {
|
||||
-- -- extensions = {
|
||||
-- -- ["ui-select"] = {
|
||||
-- -- require("telescope.themes").get_dropdown {
|
||||
-- -- }
|
||||
-- -- }
|
||||
-- -- }
|
||||
-- }
|
||||
|
||||
require("telescope").load_extension("ui-select")
|
||||
|
||||
@ -21,3 +21,5 @@ vim.api.nvim_create_autocmd('FileType', {
|
||||
pattern = 'cpp',
|
||||
callback = function() vim.bo.commentstring = '// %s' end
|
||||
})
|
||||
|
||||
vim.opt.cmdheight = 0
|
||||
|
||||
@ -8,6 +8,10 @@
|
||||
"rev": "292492a",
|
||||
"src": "https://github.com/rmagatti/auto-session"
|
||||
},
|
||||
"dressing.nvim": {
|
||||
"rev": "2d7c2db",
|
||||
"src": "https://github.com/stevearc/dressing.nvim"
|
||||
},
|
||||
"gruvbox.nvim": {
|
||||
"rev": "5e0a460",
|
||||
"src": "https://github.com/ellisonleao/gruvbox.nvim"
|
||||
@ -29,6 +33,14 @@
|
||||
"rev": "ad7146a",
|
||||
"src": "https://github.com/mason-org/mason.nvim"
|
||||
},
|
||||
"noice.nvim": {
|
||||
"rev": "7bfd942",
|
||||
"src": "https://github.com/folke/noice.nvim"
|
||||
},
|
||||
"nui.nvim": {
|
||||
"rev": "de74099",
|
||||
"src": "https://github.com/MunifTanjim/nui.nvim"
|
||||
},
|
||||
"nvim-lspconfig": {
|
||||
"rev": "2010fc6",
|
||||
"src": "https://github.com/neovim/nvim-lspconfig"
|
||||
@ -45,6 +57,11 @@
|
||||
"rev": "7e1cd77",
|
||||
"src": "https://github.com/stevearc/oil.nvim"
|
||||
},
|
||||
"overseer.nvim": {
|
||||
"rev": "c77c78b",
|
||||
"src": "https://github.com/stevearc/overseer.nvim",
|
||||
"version": "'v1.6.0'"
|
||||
},
|
||||
"plenary.nvim": {
|
||||
"rev": "b9fd522",
|
||||
"src": "https://github.com/nvim-lua/plenary.nvim"
|
||||
@ -53,10 +70,18 @@
|
||||
"rev": "eae46b4",
|
||||
"src": "https://github.com/rmagatti/session-lens"
|
||||
},
|
||||
"snacks.nvim": {
|
||||
"rev": "9a15b31",
|
||||
"src": "https://github.com/folke/snacks.nvim"
|
||||
},
|
||||
"sqlite.nvim": {
|
||||
"rev": "a8466c8",
|
||||
"src": "https://github.com/3rd/sqlite.nvim"
|
||||
},
|
||||
"telescope-ui-select.nvim": {
|
||||
"rev": "6e51d7d",
|
||||
"src": "https://github.com/nvim-telescope/telescope-ui-select.nvim"
|
||||
},
|
||||
"telescope.nvim": {
|
||||
"rev": "0294ae3",
|
||||
"src": "https://github.com/nvim-telescope/telescope.nvim"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user