From 41cf4eacf78f9d90d92fd93dea52e709b98fb4ba Mon Sep 17 00:00:00 2001 From: fm39hz-laptop Date: Mon, 15 Jul 2024 13:54:09 +0700 Subject: [PATCH] feat: configure git sign --- lua/config/keymaps.lua | 6 ++++++ lua/plugins/git/blame.lua | 22 ++++++++++++++-------- lua/plugins/override/git.lua | 13 +++++++++++++ lua/plugins/override/telescope.lua | 3 +++ 4 files changed, 36 insertions(+), 8 deletions(-) create mode 100644 lua/plugins/override/git.lua diff --git a/lua/config/keymaps.lua b/lua/config/keymaps.lua index f7a42c6..de3a9d9 100644 --- a/lua/config/keymaps.lua +++ b/lua/config/keymaps.lua @@ -12,6 +12,12 @@ map( "Precognition toggle", { desc = "Toggle Precognition", noremap = true, nowait = true } ) +map( + { "n", "v" }, + "qp", + "Telescope session-lens search_session", + { desc = "Get session list", noremap = true, nowait = true } +) -- Theme map("n", "uh", "HighlightColors Toggle", { desc = "Toggle highlighting color", nowait = true }) diff --git a/lua/plugins/git/blame.lua b/lua/plugins/git/blame.lua index 17a90ce..0939acc 100644 --- a/lua/plugins/git/blame.lua +++ b/lua/plugins/git/blame.lua @@ -1,10 +1,16 @@ return { - "f-person/git-blame.nvim", - event = "BufReadPre", - opts = { - delay = 10, - date_format = "%x • %X", - -- schedule_event = "CursorHold", - -- clear_event = "CursorHoldI", - }, + -- "f-person/git-blame.nvim", + -- event = "BufReadPre", + -- opts = { + -- date_format = "%x • %X", + -- -- schedule_event = "CursorHold", + -- -- clear_event = "CursorHoldI", + -- }, + -- "braxtons12/blame_line.nvim", + -- event = "BufReadPre", + -- opts = { + -- prefix = "  • ", + -- delay = 30, + -- -- date_format = "%x • %X", + -- }, } diff --git a/lua/plugins/override/git.lua b/lua/plugins/override/git.lua new file mode 100644 index 0000000..db4baee --- /dev/null +++ b/lua/plugins/override/git.lua @@ -0,0 +1,13 @@ +return { + "lewis6991/gitsigns.nvim", + enabled = true, + opts = { + current_line_blame = true, + current_line_blame_opts = { + virt_text = true, + virt_text_pos = "eol", + ignore_whitespace = false, + virt_text_priority = 100, + }, + }, +} diff --git a/lua/plugins/override/telescope.lua b/lua/plugins/override/telescope.lua index aa4e3da..6247467 100644 --- a/lua/plugins/override/telescope.lua +++ b/lua/plugins/override/telescope.lua @@ -3,6 +3,9 @@ return { opts = { defaults = { preview = { + session_lens = function() + require("telescope").load_extension("session-lens") + end, mime_hook = function(filepath, bufnr, opts) local is_image = function(_filepath) local image_extensions = { "png", "jpg" }