Add a couple of plugins to nvim

This commit is contained in:
Alexander Navarro 2024-03-22 10:46:03 -03:00
parent 2a980b26a8
commit 7b46aae1a1
12 changed files with 163 additions and 28 deletions

View file

@ -186,21 +186,21 @@ return {
"nvim-telescope/telescope.nvim",
},
keys = {
{ "<leader>pp", "<cmd>ChatGPT<CR>", desc = "ChatGPT" },
{ "<leader>pe", "<cmd>ChatGPTEditWithInstruction<CR>", desc = "Edit with instruction", mode = { "n", "v" } },
{ "<leader>pa", "<cmd>ChatGPTActAs<CR>", desc = "Act as", mode = { "n", "v" } },
{ "<leader>pg", "<cmd>ChatGPTRun grammar_correction<CR>", desc = "Grammar Correction", mode = { "n", "v" } },
{ "<leader>pT", "<cmd>ChatGPTRun translate<CR>", desc = "Translate", mode = { "n", "v" } },
{ "<leader>pk", "<cmd>ChatGPTRun keywords<CR>", desc = "Keywords", mode = { "n", "v" } },
{ "<leader>pd", "<cmd>ChatGPTRun docstring<CR>", desc = "Docstring", mode = { "n", "v" } },
{ "<leader>pt", "<cmd>ChatGPTRun add_tests<CR>", desc = "Add Tests", mode = { "n", "v" } },
{ "<leader>po", "<cmd>ChatGPTRun optimize_code<CR>", desc = "Optimize Code", mode = { "n", "v" } },
{ "<leader>ps", "<cmd>ChatGPTRun summarize<CR>", desc = "Summarize", mode = { "n", "v" } },
{ "<leader>pf", "<cmd>ChatGPTRun fix_bugs<CR>", desc = "Fix Bugs", mode = { "n", "v" } },
{ "<leader>px", "<cmd>ChatGPTRun explain_code<CR>", desc = "Explain Code", mode = { "n", "v" } },
{ "<leader>pr", "<cmd>ChatGPTRun roxygen_edit<CR>", desc = "Roxygen Edit", mode = { "n", "v" } },
{ "<leader>ap", "<cmd>ChatGPT<CR>", desc = "ChatGPT" },
{ "<leader>ae", "<cmd>ChatGPTEditWithInstruction<CR>", desc = "Edit with instruction", mode = { "n", "v" } },
{ "<leader>aa", "<cmd>ChatGPTActAs<CR>", desc = "Act as", mode = { "n", "v" } },
{ "<leader>ag", "<cmd>ChatGPTRun grammar_correction<CR>", desc = "Grammar Correction", mode = { "n", "v" } },
{ "<leader>aT", "<cmd>ChatGPTRun translate<CR>", desc = "Translate", mode = { "n", "v" } },
{ "<leader>ak", "<cmd>ChatGPTRun keywords<CR>", desc = "Keywords", mode = { "n", "v" } },
{ "<leader>ad", "<cmd>ChatGPTRun docstring<CR>", desc = "Docstring", mode = { "n", "v" } },
{ "<leader>at", "<cmd>ChatGPTRun add_tests<CR>", desc = "Add Tests", mode = { "n", "v" } },
{ "<leader>ao", "<cmd>ChatGPTRun optimize_code<CR>", desc = "Optimize Code", mode = { "n", "v" } },
{ "<leader>as", "<cmd>ChatGPTRun summarize<CR>", desc = "Summarize", mode = { "n", "v" } },
{ "<leader>af", "<cmd>ChatGPTRun fix_bugs<CR>", desc = "Fix Bugs", mode = { "n", "v" } },
{ "<leader>ax", "<cmd>ChatGPTRun explain_code<CR>", desc = "Explain Code", mode = { "n", "v" } },
{ "<leader>ar", "<cmd>ChatGPTRun roxygen_edit<CR>", desc = "Roxygen Edit", mode = { "n", "v" } },
{
"<leader>pl",
"<leader>al",
"<cmd>ChatGPTRun code_readability_analysis<CR>",
desc = "Code Readability Analysis",
mode = { "n", "v" },

View file

@ -12,6 +12,7 @@ return { -- Change colors.none if not using a transparent background
mason = true,
neogit = true,
noice = true,
hop = true,
lsp_trouble = true,
indent_blankline = {
enabled = true,

View file

@ -1,7 +1,17 @@
return {
-- Detect tabstop and shiftwidth automatically
"tpope/vim-sleuth",
{
"mbbill/undotree",
config = function()
vim.g.undotree_WindowLayout = 2
vim.g.undotree_ShortIndicators = 1
vim.g.undotree_SetFocusWhenToggle = 1
end,
keys = {
{ "<leader>fu", vim.cmd.UndotreeToggle, desc = "Undo tree" },
},
},
{
-- Highlight word under cursor
"RRethy/vim-illuminate",

View file

@ -57,9 +57,10 @@ return {
{ mode = "n", keys = "<Leader>u", desc = "+UI & Config" },
{ mode = "n", keys = "<Leader>un", desc = "+Noice" },
{ mode = "n", keys = "<Leader>w", desc = "+Workspace" },
{ mode = "n", keys = "<Leader>p", desc = "+ChatGPT" },
{ mode = "v", keys = "<Leader>p", desc = "+ChatGPT" },
{ mode = "n", keys = "<Leader>p", desc = "+ChatGPT" },
{ mode = "n", keys = "<Leader>p", desc = "+Run stuff" },
{ mode = "n", keys = "<Leader>a", desc = "+ChatGPT" },
{ mode = "v", keys = "<Leader>a", desc = "+ChatGPT" },
{ mode = "n", keys = "<Leader>a", desc = "+ChatGPT" },
},
-- Clue window settings

View file

@ -66,6 +66,9 @@ return {
hint = icons.diagnostics.Hint,
},
},
{
"overseer",
},
{
-- Macro recording status
function()

View file

@ -5,9 +5,10 @@ return {
---@diagnostic disable-next-line: missing-fields
require("auto-session").setup({
log_level = "error",
auto_session_suppress_dirs = { "~/", "~/Downloads", "/" },
auto_session_suppress_dirs = { "~/", "~/Downloads", "/", "~/.config/**" },
bypass_session_save_file_types = {
"NeogitStatus",
"Lazy",
},
})
end,

View file

@ -0,0 +1,39 @@
return {
"stevearc/overseer.nvim",
keys = {
{ "<leader>pp", "<CMD>OverseerToggle<CR>", desc = "Toggle task runner" },
{ "<leader>pr", "<CMD>OverseerRun<CR>", desc = "Run task" },
{ "<leader>pf", "<CMD>OverseerQuickAction open float<CR>", desc = "Display current tasks" },
{ "<leader>pm", "<CMD>OverseerTaskAction<CR>", desc = "Manage current tasks" },
},
opts = {
task_list = {
direction = "bottom",
bindings = {
["?"] = "ShowHelp",
["g?"] = "ShowHelp",
["<CR>"] = "RunAction",
["<C-e>"] = "Edit",
["o"] = "Open",
["<C-v>"] = "OpenVsplit",
["<C-s>"] = "OpenSplit",
["<C-f>"] = "OpenFloat",
["<C-q>"] = "OpenQuickFix",
["<TAB>"] = "TogglePreview",
["p"] = "TogglePreview",
["<C-l>"] = "IncreaseAllDetail",
["<C-h>"] = "DecreaseAllDetail",
["L"] = "IncreaseDetail",
["H"] = "DecreaseDetail",
["["] = "DecreaseWidth",
["]"] = "IncreaseWidth",
["{"] = "PrevTask",
["}"] = "NextTask",
["<C-u>"] = "ScrollOutputUp",
["<C-d>"] = "ScrollOutputDown",
["q"] = "Close",
["d"] = "<CMD>OverseerQuickAction dispose<CR>",
},
},
},
}

View file

@ -13,9 +13,6 @@ return {
return vim.fn.executable("make") == 1
end,
},
{
"nvim-telescope/telescope-file-browser.nvim",
},
},
config = function()
local actions = require("telescope.actions")
@ -53,7 +50,6 @@ return {
-- Enable telescope fzf native, if installed
pcall(telescope.load_extension, "fzf")
pcall(telescope.load_extension, "file_browser")
-- Find files
vim.keymap.set(

View file

@ -0,0 +1,81 @@
return {
"folke/zen-mode.nvim",
dependencies = {
{
"folke/twilight.nvim",
opts = {
-- your configuration comes here
-- or leave it empty to use the default settings
-- refer to the configuration section below
},
},
},
keys = {
{
"<leader>uz",
function()
require("zen-mode").toggle({})
end,
desc = "Toggle zen mode",
},
},
opts = {
window = {
backdrop = 0.95, -- shade the backdrop of the Zen window. Set to 1 to keep the same as Normal
-- height and width can be:
-- * an absolute number of cells when > 1
-- * a percentage of the width / height of the editor when <= 1
-- * a function that returns the width or the height
width = 0.8, -- width of the Zen window
height = 1, -- height of the Zen window
-- by default, no options are changed for the Zen window
-- uncomment any of the options below, or add other vim.wo options you want to apply
options = {
-- signcolumn = "no", -- disable signcolumn
-- number = false, -- disable number column
-- relativenumber = false, -- disable relative numbers
cursorline = false, -- disable cursorline
-- cursorcolumn = false, -- disable cursor column
-- foldcolumn = "0", -- disable fold column
list = false, -- disable whitespace characters
},
},
plugins = {
-- disable some global vim options (vim.o...)
-- comment the lines to not apply the options
options = {
enabled = true,
ruler = true, -- disables the ruler text in the cmd line area
showcmd = false, -- disables the command in the last line of the screen
-- you may turn on/off statusline in zen mode by setting 'laststatus'
-- statusline will be shown only if 'laststatus' == 3
laststatus = 0, -- turn off the statusline in zen mode
},
twilight = { enabled = true }, -- enable to start Twilight when zen mode opens
gitsigns = { enabled = false }, -- disables git signs
tmux = { enabled = true }, -- disables the tmux statusline
-- this will change the font size on kitty when in zen mode
-- to make this work, you need to set the following kitty options:
-- - allow_remote_control socket-only
-- - listen_on unix:/tmp/kitty
kitty = {
enabled = true,
font = "+8", -- font size increment
},
-- this will change the font size on alacritty when in zen mode
-- requires Alacritty Version 0.10.0 or higher
-- uses `alacritty msg` subcommand to change font size
alacritty = {
enabled = true,
font = "14", -- font size
},
-- this will change the font size on wezterm when in zen mode
-- See else also the Plugins/Wezterm section in this projects README
wezterm = {
enabled = true,
-- can be either an absolute font size or the number of incremental steps
font = "+4", -- (10% increase per step)
},
},
},
}