From d8ffab83be68f10fc349ad9e2591206cde63f690 Mon Sep 17 00:00:00 2001 From: kylo252 <59826753+kylo252@users.noreply.github.com> Date: Thu, 9 May 2024 09:43:12 +0200 Subject: [PATCH] chore: update utils plugins (#4558) --- lua/lvim/core/autopairs.lua | 16 ++++++++++++---- lua/lvim/core/terminal.lua | 4 ++++ lua/lvim/core/which-key.lua | 10 ++++++++-- snapshots/default.json | 26 +++++++++++++------------- 4 files changed, 37 insertions(+), 19 deletions(-) diff --git a/lua/lvim/core/autopairs.lua b/lua/lvim/core/autopairs.lua index a3e0d594..439de096 100644 --- a/lua/lvim/core/autopairs.lua +++ b/lua/lvim/core/autopairs.lua @@ -19,18 +19,26 @@ function M.config() java = false, }, disable_filetype = { "TelescopePrompt", "spectre_panel" }, - ignored_next_char = string.gsub([[ [%w%%%'%[%"%.] ]], "%s+", ""), - enable_moveright = true, ---@usage disable when recording or executing a macro disable_in_macro = false, + ---@usage disable when insert after visual block mode + disable_in_visualblock = false, + disable_in_replace_mode = true, + ignored_next_char = string.gsub([[ [%w%%%'%[%"%.] ]], "%s+", ""), + enable_moveright = true, ---@usage add bracket pairs after quote enable_afterquote = true, + ---@usage trigger abbreviation + enable_abbr = false, + ---@usage switch for basic rule break undo sequence + break_undo = true, + map_cr = true, ---@usage map the key map_bs = true, ---@usage map to delete a pair if possible map_c_w = false, - ---@usage disable when insert after visual block mode - disable_in_visualblock = false, + ---@usage Map the key to delete a pair + map_c_h = false, ---@usage change default fast_wrap fast_wrap = { map = "", diff --git a/lua/lvim/core/terminal.lua b/lua/lvim/core/terminal.lua index 6e0cb582..53922d83 100644 --- a/lua/lvim/core/terminal.lua +++ b/lua/lvim/core/terminal.lua @@ -18,6 +18,7 @@ M.config = function() -- direction = 'vertical' | 'horizontal' | 'window' | 'float', direction = "float", close_on_exit = true, -- close the terminal window when the process exits + auto_scroll = true, -- automatically scroll to the bottom on terminal output shell = nil, -- change the default shell -- This field is only relevant if direction is set to 'float' float_opts = { @@ -35,6 +36,9 @@ M.config = function() background = "Normal", }, }, + winbar = { + enabled = false, + }, -- Add executables on the config.lua -- { cmd, keymap, description, direction, size } -- lvim.builtin.terminal.execs = {...} to overwrite diff --git a/lua/lvim/core/which-key.lua b/lua/lvim/core/which-key.lua index 7d442a2b..ab548d93 100644 --- a/lua/lvim/core/which-key.lua +++ b/lua/lvim/core/which-key.lua @@ -101,6 +101,11 @@ M.config = function() name = "LSP", a = { "lua vim.lsp.buf.code_action()", "Code Action" }, }, + g = { + name = "Git", + r = { "Gitsigns reset_hunk", "Reset Hunk" }, + s = { "Gitsigns stage_hunk", "Stage Hunk" }, + }, }, mappings = { [";"] = { "Alpha", "Dashboard" }, @@ -181,9 +186,10 @@ M.config = function() g = { name = "Git", g = { "lua require 'lvim.core.terminal'.lazygit_toggle()", "Lazygit" }, - j = { "lua require 'gitsigns'.next_hunk({navigation_message = false})", "Next Hunk" }, - k = { "lua require 'gitsigns'.prev_hunk({navigation_message = false})", "Prev Hunk" }, + j = { "lua require 'gitsigns'.nav_hunk('next', {navigation_message = false})", "Next Hunk" }, + k = { "lua require 'gitsigns'.nav_hunk('prev', {navigation_message = false})", "Prev Hunk" }, l = { "lua require 'gitsigns'.blame_line()", "Blame" }, + L = { "lua require 'gitsigns'.blame_line({full=true})", "Blame Line (full)" }, p = { "lua require 'gitsigns'.preview_hunk()", "Preview Hunk" }, r = { "lua require 'gitsigns'.reset_hunk()", "Reset Hunk" }, R = { "lua require 'gitsigns'.reset_buffer()", "Reset Buffer" }, diff --git a/snapshots/default.json b/snapshots/default.json index f458bce8..8633f90f 100644 --- a/snapshots/default.json +++ b/snapshots/default.json @@ -18,10 +18,10 @@ "commit": "3022dbc" }, "cmp-cmdline": { - "commit": "8ee981b" + "commit": "d250c63" }, "cmp-nvim-lsp": { - "commit": "44b16d1" + "commit": "5af77f5" }, "cmp-path": { "commit": "91ff86c" @@ -30,10 +30,10 @@ "commit": "05a9ab2" }, "friendly-snippets": { - "commit": "53d3df2" + "commit": "3e9a3f5" }, "gitsigns.nvim": { - "commit": "6ef8c54" + "commit": "805610a" }, "indent-blankline.nvim": { "commit": "9637670" @@ -66,10 +66,10 @@ "commit": "3a48266" }, "nvim-autopairs": { - "commit": "0f04d78" + "commit": "14e9737" }, "nvim-cmp": { - "commit": "0b751f6" + "commit": "cd2cf0c" }, "nvim-dap": { "commit": "13ce59d" @@ -93,37 +93,37 @@ "commit": "b8ff464" }, "nvim-web-devicons": { - "commit": "475fbcf" + "commit": "5b90678" }, "onedarker.nvim": { "commit": "b00dd21" }, "plenary.nvim": { - "commit": "55d9fe8" + "commit": "08e3019" }, "project.nvim": { "commit": "8c6bad7" }, "schemastore.nvim": { - "commit": "2ef728f" + "commit": "8c46453" }, "structlog.nvim": { "commit": "45b26a2" }, "telescope-fzf-native.nvim": { - "commit": "6c921ca" + "commit": "9ef21b2" }, "telescope.nvim": { - "commit": "d909568" + "commit": "6312868" }, "toggleterm.nvim": { - "commit": "6b334b9" + "commit": "066cccf" }, "tokyonight.nvim": { "commit": "67afeaf" }, "vim-illuminate": { - "commit": "3bd2ab6" + "commit": "e522e0d" }, "which-key.nvim": { "commit": "4433e5e"