mirror of
https://github.com/LazyVim/starter.git
synced 2026-07-25 14:01:03 +00:00
diff view
This commit is contained in:
parent
b259d28da3
commit
ab4a79d91e
7 changed files with 43 additions and 12 deletions
|
|
@ -38,10 +38,10 @@ end, { desc = "Yank current file path to system clipboard" })
|
|||
vim.keymap.set("v", "<leader>y", '"*y', { desc = "Yank to system clipboard" })
|
||||
-- jq
|
||||
vim.keymap.set("n", "<leader>jq", ":%!jq<CR>", { desc = "Stream current buffer to jq (json.parse current buffer)" })
|
||||
-- Telescope resume last search
|
||||
vim.keymap.set("n", "<leader><space>", function()
|
||||
vim.cmd("Telescope resume")
|
||||
end, { desc = "Telescope resume last search" })
|
||||
-- -- Telescope resume last search
|
||||
-- vim.keymap.set("n", "<leader><space>", function()
|
||||
-- vim.cmd("Telescope resume")
|
||||
-- end, { desc = "Telescope resume last search" })
|
||||
-- Delete mark
|
||||
vim.keymap.set("n", "<leader>dm", ":delmarks ", { desc = "Stream current buffer to jq (json.parse current buffer)" })
|
||||
-- Close buffler split
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ require("lazy").setup({
|
|||
{ import = "lazyvim.plugins.extras.formatting.prettier" },
|
||||
{ import = "lazyvim.plugins.extras.ui.alpha" },
|
||||
-- { import = "lazyvim.plugins.extras.editor.symbols-outline" },
|
||||
{ import = "lazyvim.plugins.extras.editor.leap" },
|
||||
-- { import = "lazyvim.plugins.extras.editor.leap" },
|
||||
-- { import = "lazyvim.plugins.extras.ui.mini-animate" },
|
||||
-- import/override with your plugins
|
||||
{ import = "plugins" },
|
||||
|
|
|
|||
22
lua/plugins/diff-view.lua
Normal file
22
lua/plugins/diff-view.lua
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
return {
|
||||
"sindrets/diffview.nvim",
|
||||
opts = {
|
||||
view = { merge_tool = { layout = "diff3_mixed" } },
|
||||
hooks = {
|
||||
diff_buf_win_enter = function(bufnr, winid, ctx)
|
||||
if ctx.layout_name:match("^diff3") then
|
||||
if ctx.symbol == "a" then
|
||||
vim.opt_local.winhl = table.concat({
|
||||
"DiffAdd:DiffviewDiffAddAsDelete",
|
||||
"DiffDelete:DiffviewDiffDelete",
|
||||
}, ",")
|
||||
elseif ctx.symbol == "b" then
|
||||
vim.opt_local.winhl = table.concat({
|
||||
"DiffDelete:DiffviewDiffDelete",
|
||||
}, ",")
|
||||
end
|
||||
end
|
||||
end,
|
||||
},
|
||||
},
|
||||
}
|
||||
14
lua/plugins/flash.lua
Normal file
14
lua/plugins/flash.lua
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
return {
|
||||
"folke/flash.nvim",
|
||||
event = "VeryLazy",
|
||||
---@type Flash.Config
|
||||
opts = {},
|
||||
-- stylua: ignore
|
||||
keys = {
|
||||
{ "s", mode = { "n", "x", "o" }, function() require("flash").jump() end, desc = "Flash" },
|
||||
{ "S", mode = { "n", "x", "o" }, function() require("flash").treesitter() end, desc = "Flash Treesitter" },
|
||||
{ "r", mode = "o", function() require("flash").remote() end, desc = "Remote Flash" },
|
||||
{ "R", mode = { "o", "x" }, function() require("flash").treesitter_search() end, desc = "Treesitter Search" },
|
||||
{ "<c-s>", mode = { "c" }, function() require("flash").toggle() end, desc = "Toggle Flash Search" },
|
||||
},
|
||||
}
|
||||
|
|
@ -1,5 +1,6 @@
|
|||
return {
|
||||
"akinsho/git-conflict.nvim",
|
||||
enabled = false,
|
||||
version = "*",
|
||||
config = true,
|
||||
opts = {
|
||||
|
|
|
|||
|
|
@ -1,7 +0,0 @@
|
|||
return {
|
||||
"lukas-reineke/indent-blankline.nvim",
|
||||
main = "ibl",
|
||||
opts = {
|
||||
indent = { highlight = { "CursorColumn" }, char = "" },
|
||||
},
|
||||
}
|
||||
|
|
@ -1,5 +1,6 @@
|
|||
return {
|
||||
"NeogitOrg/neogit",
|
||||
enabled = false,
|
||||
dependencies = {
|
||||
"nvim-lua/plenary.nvim", -- required
|
||||
"sindrets/diffview.nvim", -- optional - Diff integration
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue