feat: major fixes on buffers and git

This commit is contained in:
2025-09-04 16:47:10 +02:00
parent e6078e420b
commit 4e11d36b93
6 changed files with 80 additions and 40 deletions

View File

@@ -4,7 +4,8 @@ local map = vim.keymap.set
---- Bufferline ----
map("n", "bg", "<CMD>BufferLinePick<CR>")
map("n", "<leader>bpx", "<CMD>BufferLinePickClose<CR>")
map("n", "<leader>box", "<CMD>BufferLineCloseOthers<CR>") map("n", "<Tab>", "<CMD>BufferLineCycleNext<CR>")
map("n", "<leader>box", "<CMD>BufferLineCloseOthers<CR>")
map("n", "<Tab>", "<CMD>BufferLineCycleNext<CR>")
map("n", "<S-Tab>", "<CMD>BufferLineCyclePrev<CR>")
map("n", "bsd", "<CMD>BufferLineSortByDirectory<CR>")
map("n", "bse", "<CMD>BufferLineSortByExtension<CR>")
@@ -15,8 +16,13 @@ map("n", "<S-h>", "<cmd>BufferLineMovePrev<cr>", { desc = "Move buffer to left"
map("n", "<S-l>", "<cmd>BufferLineMoveNext<cr>", { desc = "Move buffer to right" })
map("n", "[b", "<cmd>bprevious<cr>", { desc = "Prev Buffer" })
map("n", "]b", "<cmd>bnext<cr>", { desc = "Next Buffer" })
map("n", "<leader>bd", "<cmd>bdelete<cr>", { desc = "Delete Buffer" })
map("n", "<leader>x", "<cmd>bdelete<cr>", { desc = "Delete Buffer" })
map("n", "<leader>bd", function()
Snacks.bufdelete()
end, { desc = "Delete Buffer" })
map("n", "<leader>x", function()
Snacks.bufdelete()
end, { desc = "Delete Buffer" })
-- tabpages
map("n", "]<Tab>", "<cmd>:+tabnext<cr>", { desc = "Goes to the next tabpage" })
map("n", "[<Tab>", "<cmd>:-tabnext<cr>", { desc = "Goes to the previous tabpage" })
@@ -38,6 +44,7 @@ map("n", "<leader>gb", "<CMD>Gitsigns blame<CR>")
map("n", "<leader>gd", "<CMD>DiffviewOpen<CR>")
map("n", "<leader>gx", "<CMD>DiffviewClose<CR>")
map("n", "K", "<CMD>Gitsigns blame_line<CR>")
map("n", "<leader>gh", "<CMD>Gitsigns preview_hunk_inline<CR>")
map("n", "<leader>gtb", "<CMD>Gitsigns toggle_current_line_blame<CR>")
map("n", "<leader>gtd", "<CMD>Gitsigns toggle_deleted")
map("n", "<leader>gc", "<cmd>Telescope git_commits <CR>", { desc = "Git commits" })

View File

@@ -1,15 +1,24 @@
local config = {
signs = {
add = { text = "" },
change = { text = "" },
delete = { text = "_" },
topdelete = { text = "" },
changedelete = { text = "~" },
untracked = { text = "" },
add = { text = '' },
change = { text = '' },
delete = { text = '_' },
topdelete = { text = '' },
changedelete = { text = '~' },
untracked = { text = '' },
},
signs_staged = {
add = { text = '' },
change = { text = '' },
delete = { text = '_' },
topdelete = { text = '' },
changedelete = { text = '~' },
untracked = { text = '' },
},
signs_staged_enable = true,
signcolumn = true, -- Toggle with `:Gitsigns toggle_signs`
numhl = false, -- Toggle with `:Gitsigns toggle_numhl`
linehl = false, -- Toggle with `:Gitsigns toggle_linehl`
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,
@@ -27,7 +36,7 @@ local config = {
current_line_blame_formatter = "<author>, <author_time:%R> - <summary>",
sign_priority = 6,
update_debounce = 100,
status_formatter = nil, -- Use default
status_formatter = nil, -- Use default
max_file_length = 40000, -- Disable if file is longer than this (in lines)
preview_config = {
-- Options passed to nvim_open_win

View File

@@ -88,7 +88,7 @@ local config = {
-- see `:h neo-tree-custom-commands-global`
commands = {},
window = {
position = "float",
position = "left",
width = 40,
mapping_options = {
noremap = true,

23
lua/plugins/qol.lua Normal file
View File

@@ -0,0 +1,23 @@
local config = {
{
"folke/snacks.nvim",
priority = 1000,
lazy = false,
opts = {
bigfile = { enabled = true },
dashboard = { enabled = true },
explorer = { enabled = false },
indent = { enabled = false },
input = { enabled = false },
picker = { enabled = true },
notifier = { enabled = false },
quickfile = { enabled = false },
scope = { enabled = true },
scroll = { enabled = true },
statuscolumn = { enabled = true },
words = { enabled = true },
},
}
}
return config

View File

@@ -19,22 +19,22 @@ return {
version = "*",
},
-- {
-- "sphamba/smear-cursor.nvim",
-- opts = {
-- smear_between_buffers = false,
-- smear_between_neighbor_lines = true,
-- scroll_buffer_space = true,
-- -- Set to `true` if your font supports legacy computing symbols (block unicode symbols).
-- legacy_computing_symbols_support = false,
-- smear_insert_mode = true,
--
-- -- fast smear
-- stiffness = 0.8, -- 0.6 [0, 1]
-- trailing_stiffness = 0.5, -- 0.4 [0, 1]
-- stiffness_insert_mode = 0.6, -- 0.4 [0, 1]
-- trailing_stiffness_insert_mode = 0.6, -- 0.4 [0, 1]
-- distance_stop_animating = 0.5, -- 0.1 > 0
-- },
-- },
{
"sphamba/smear-cursor.nvim",
opts = {
smear_between_buffers = false,
smear_between_neighbor_lines = true,
scroll_buffer_space = true,
-- Set to `true` if your font supports legacy computing symbols (block unicode symbols).
legacy_computing_symbols_support = false,
smear_insert_mode = true,
-- fast smear
stiffness = 0.8, -- 0.6 [0, 1]
trailing_stiffness = 0.5, -- 0.4 [0, 1]
stiffness_insert_mode = 0.6, -- 0.4 [0, 1]
trailing_stiffness_insert_mode = 0.6, -- 0.4 [0, 1]
distance_stop_animating = 0.5, -- 0.1 > 0
},
},
}