Added compiler and extras

This commit is contained in:
Eduardo Cueto-Mendoza 2024-09-25 17:19:14 +01:00
parent 0f68973179
commit c512fa1226
3 changed files with 35 additions and 3 deletions

View File

@ -184,6 +184,26 @@ local plugins = {
{
'sakhnik/nvim-gdb',
},
-- Compiler
{ -- This plugin
"Zeioth/compiler.nvim",
cmd = { "CompilerOpen", "CompilerToggleResults", "CompilerRedo" },
dependencies = { "stevearc/overseer.nvim", "nvim-telescope/telescope.nvim" },
opts = {},
},
{ -- The task runner we use
"stevearc/overseer.nvim",
commit = "6271cab7ccc4ca840faa93f54440ffae3a3918bd",
cmd = { "CompilerOpen", "CompilerToggleResults", "CompilerRedo" },
opts = {
task_list = {
direction = "bottom",
min_height = 25,
max_height = 25,
default_detail = 1
},
},
},
}
require('lazy').setup(plugins, {

View File

@ -129,7 +129,7 @@ then
vim.opt.updatetime = 50
vim.opt.colorcolumn = "80"
vim.opt.colorcolumn = "110"
-- LSP options
vim.diagnostic.config({
@ -212,7 +212,7 @@ then
vim.opt.updatetime = 50
vim.opt.colorcolumn = "80"
vim.opt.colorcolumn = "110"
-- LSP options
vim.diagnostic.config({

View File

@ -60,7 +60,7 @@ vim.keymap.set("n", "<leader>U", "<cmd>GitGutterUndoHunk<CR>", { desc = "Revert
vim.keymap.set("n", "<leader>cf", "<cmd>let @+ = expand(\"%\")<CR>", { desc = "Copy File Name" })
vim.keymap.set("n", "<leader>cp", "<cmd>let @+ = expand(\"%:p\")<CR>", { desc = "Copy File Path" })
vim.keymap.set("n", "<leader><leader>", function()
vim.keymap.set("n", "<leader>so", function()
vim.cmd("so")
end, { desc = "Source current file" })
@ -70,6 +70,18 @@ vim.keymap.set("n", "<C-S-Up>", ":resize -2<CR>", { desc = "Resize Horizontal Sp
vim.keymap.set("n", "<C-Left>", ":vertical resize -2<CR>", { desc = "Resize Vertical Split Down" })
vim.keymap.set("n", "<C-Right>", ":vertical resize +2<CR>", { desc = "Resize Vertical Split Up" })
-- Open compiler
vim.api.nvim_set_keymap('n', '<leader><leader>', "<cmd>CompilerOpen<cr>", { noremap = true, silent = true })
-- Redo last selected option
vim.api.nvim_set_keymap('n', '<leader><leader><leader>',
"<cmd>CompilerStop<cr>" -- (Optional, to dispose all tasks before redo)
.. "<cmd>CompilerRedo<cr>",
{ noremap = true, silent = true })
-- Toggle compiler results
vim.api.nvim_set_keymap('n', '<leader><leader>t', "<cmd>CompilerToggleResults<cr>", { noremap = true, silent = true })
-- Visual --
-- Stay in indent mode
vim.keymap.set("v", "<", "<gv")