From 6783fd3d9c8bc92516a4cb754aed5660544a3453 Mon Sep 17 00:00:00 2001 From: TiagoRG Date: Mon, 11 Dec 2023 23:33:21 +0000 Subject: [PATCH] anotha update waw Signed-off-by: TiagoRG --- .config/nvim/after/plugin/aerial.lua | 3 + .config/nvim/after/plugin/gitsigns.lua | 87 +++++++++++++++++++++++++ .config/nvim/after/plugin/harpoon.lua | 10 --- .config/nvim/after/plugin/lualine.lua | 2 +- .config/nvim/after/plugin/presence.lua | 2 +- .config/nvim/after/plugin/tabset.lua | 7 ++ .config/nvim/lua/tiagorg/packer.lua | 13 +++- .config/nvim/lua/tiagorg/remap.lua | 2 +- .config/nvim/plugin/packer_compiled.lua | 49 +++++++++----- .gitconfig | 2 + .zsh/.zsh_clear | 1 + .zsh/.zshrc | 3 +- 12 files changed, 149 insertions(+), 32 deletions(-) create mode 100644 .config/nvim/after/plugin/aerial.lua create mode 100644 .config/nvim/after/plugin/gitsigns.lua delete mode 100644 .config/nvim/after/plugin/harpoon.lua create mode 100644 .zsh/.zsh_clear diff --git a/.config/nvim/after/plugin/aerial.lua b/.config/nvim/after/plugin/aerial.lua new file mode 100644 index 0000000..18c4086 --- /dev/null +++ b/.config/nvim/after/plugin/aerial.lua @@ -0,0 +1,3 @@ +vim.keymap.set("n", "{", "AerialPrev") +vim.keymap.set("n", "}", "AerialNext") +vim.keymap.set("n", "", "AerialToggle float") diff --git a/.config/nvim/after/plugin/gitsigns.lua b/.config/nvim/after/plugin/gitsigns.lua new file mode 100644 index 0000000..0cf983b --- /dev/null +++ b/.config/nvim/after/plugin/gitsigns.lua @@ -0,0 +1,87 @@ +require('gitsigns').setup { + -- config + signs = { + add = { text = '│' }, + change = { text = '│' }, + delete = { text = '_' }, + topdelete = { text = '‾' }, + changedelete = { text = '~' }, + untracked = { text = '│' }, + --untracked = { text = '┆' }, + }, + signcolumn = true, -- Toggle with `:Gitsigns toggle_signs` + numhl = true, -- Toggle with `:Gitsigns toggle_numhl` + linehl = false, -- Toggle with `:Gitsigns toggle_linehl` + word_diff = false, -- Toggle with `:Gitsigns toggle_word_diff` + watch_gitdir = { + follow_files = true + }, + attach_to_untracked = true, + current_line_blame = true, -- Toggle with `:Gitsigns toggle_current_line_blame` + current_line_blame_opts = { + virt_text = true, + virt_text_pos = 'eol', -- 'eol' | 'overlay' | 'right_align' + delay = 100, + ignore_whitespace = false, + virt_text_priority = 100, + }, + current_line_blame_formatter = ' ', + sign_priority = 6, + update_debounce = 100, + status_formatter = nil, -- Use default + max_file_length = 10000, -- Disable if file is longer than this (in lines) + preview_config = { + -- Options passed to nvim_open_win + border = 'single', + style = 'minimal', + relative = 'cursor', + row = 0, + col = 1 + }, + yadm = { + enable = false + }, + + -- keymaping + on_attach = function(bufnr) + local gs = package.loaded.gitsigns + + local function map(mode, l, r, opts) + opts = opts or {} + opts.buffer = bufnr + vim.keymap.set(mode, l, r, opts) + end + + -- Navigation + map('n', ')', function() + if vim.wo.diff then return ')' end + vim.schedule(function() gs.next_hunk() end) + return '' + end, { expr = true }) + + map('n', '(', function() + if vim.wo.diff then return '(' end + vim.schedule(function() gs.prev_hunk() end) + return '' + end, { expr = true }) + + -- Actions + map('n', 'hs', gs.stage_hunk) + map('n', 'hr', gs.reset_hunk) + map('v', 'hs', function() gs.stage_hunk { vim.fn.line('.'), vim.fn.line('v') } end) + map('v', 'hr', function() gs.reset_hunk { vim.fn.line('.'), vim.fn.line('v') } end) + map('n', 'hS', gs.stage_buffer) + map('n', 'hu', gs.undo_stage_hunk) + map('n', 'hR', gs.reset_buffer) + map('n', 'hp', gs.preview_hunk) + map('n', 'hb', function() gs.blame_line { full = true } end) + map('n', 'tb', gs.toggle_current_line_blame) + map('n', 'hd', gs.diffthis) + map('n', 'hD', function() gs.diffthis('~') end) + map('n', 'td', gs.toggle_deleted) + map('n', 'hc', gs.select_hunk) + + -- Text object + map({ 'o', 'x' }, 'ih', ':Gitsigns select_hunk') + end +} diff --git a/.config/nvim/after/plugin/harpoon.lua b/.config/nvim/after/plugin/harpoon.lua deleted file mode 100644 index b8406a0..0000000 --- a/.config/nvim/after/plugin/harpoon.lua +++ /dev/null @@ -1,10 +0,0 @@ -local mark = require("harpoon.mark") -local ui = require("harpoon.ui") - -vim.keymap.set("n", "a", mark.add_file) -vim.keymap.set("n", "", ui.toggle_quick_menu) - ---vim.keymap.set("n", "", function() ui.nav_file(1) end) ---vim.keymap.set("n", "", function() ui.nav_file(2) end) ---vim.keymap.set("n", "", function() ui.nav_file(3) end) ---vim.keymap.set("n", "", function() ui.nav_file(4) end) diff --git a/.config/nvim/after/plugin/lualine.lua b/.config/nvim/after/plugin/lualine.lua index 906b8de..5a0ef76 100644 --- a/.config/nvim/after/plugin/lualine.lua +++ b/.config/nvim/after/plugin/lualine.lua @@ -20,7 +20,7 @@ require('lualine').setup { sections = { lualine_a = { 'fileformat', 'mode' }, lualine_b = { 'branch', 'diff', 'diagnostics' }, - lualine_c = { 'filename' }, + lualine_c = { 'filename', 'aerial' }, lualine_x = { 'filesize', 'filetype' }, lualine_y = { 'progress' }, lualine_z = { 'selectioncount', 'location' } diff --git a/.config/nvim/after/plugin/presence.lua b/.config/nvim/after/plugin/presence.lua index 226c563..f9f50b0 100644 --- a/.config/nvim/after/plugin/presence.lua +++ b/.config/nvim/after/plugin/presence.lua @@ -9,7 +9,7 @@ require("presence").setup({ log_level = nil, -- Log messages at or above this level (one of the following: "debug", "info", "warn", "error") debounce_timeout = 1, -- Number of seconds to debounce events (or calls to `:lua package.loaded.presence:update(, true)`) enable_line_number = false, -- Displays the current line number instead of the current project - blacklist = {"glua-atas"}, -- A list of strings or Lua patterns that disable Rich Presence if the current file name, path, or workspace matches + blacklist = {"glua-atas", "toggleterm"},-- A list of strings or Lua patterns that disable Rich Presence if the current file name, path, or workspace matches buttons = true, -- Configure Rich Presence button(s), either a boolean to enable/disable, a static table (`{{ label = "