From f0b594a10d473524947c7deaf452d1c1f05d0912 Mon Sep 17 00:00:00 2001 From: Taken Date: Mon, 9 Sep 2024 19:19:34 +0200 Subject: [PATCH] Updated config --- lua/taken/plugins/otherplugins.lua | 70 ++++++++++++++++++++++++++---- lua/taken/plugins/trouble.lua | 38 ++++++++++++++++ 2 files changed, 100 insertions(+), 8 deletions(-) create mode 100644 lua/taken/plugins/trouble.lua diff --git a/lua/taken/plugins/otherplugins.lua b/lua/taken/plugins/otherplugins.lua index 34331ab..3b196f2 100644 --- a/lua/taken/plugins/otherplugins.lua +++ b/lua/taken/plugins/otherplugins.lua @@ -50,13 +50,6 @@ return { vim.keymap.set("n", "ft", "TodoTelescope", { noremap = true, silent = true }) end, }, - { - "folke/trouble.nvim", - dependencies = { "nvim-tree/nvim-web-devicons" }, - keys = { - { "tt", "TroubleToggl ", desc = "Toggle trouble" }, - }, - }, { "mbbill/undotree", cmd = "UndotreeToggle", @@ -93,7 +86,7 @@ return { { "kylechui/nvim-surround", version = "*", - event = { "BufReadPre", "BufNewFile" }, + event = "VeryLazy", config = true, }, { @@ -112,6 +105,67 @@ return { { "tm", "MarkdownPreviewToggle ", desc = "Toggle markdown preview" }, }, }, + { + "akinsho/git-conflict.nvim", + version = "*", + config = function() + local git_conflict = require("git-conflict") + + git_conflict.setup({}) + + vim.api.nvim_create_autocmd("User", { + pattern = "GitConflictDetected", + callback = function() + vim.notify("Conflict detected in " .. vim.fn.expand("")) + end, + }) + + vim.api.nvim_create_autocmd("User", { + pattern = "GitConflictResolved", + callback = function() + vim.notify("Conflict resolved in " .. vim.fn.expand("")) + end, + }) + end, + }, + { + "folke/trouble.nvim", + dependencies = { "nvim-tree/nvim-web-devicons" }, + cmd = "Trouble", + config = true, + keys = { + { + "xx", + "Trouble diagnostics toggle", + desc = "Diagnostics (Trouble)", + }, + { + "xX", + "Trouble diagnostics toggle filter.buf=0", + desc = "Buffer Diagnostics (Trouble)", + }, + { + "xs", + "Trouble symbols toggle focus=false", + desc = "Symbols (Trouble)", + }, + { + "xl", + "Trouble lsp toggle focus=false win.position=right", + desc = "LSP Definitions / references / ... (Trouble)", + }, + { + "xL", + "Trouble loclist toggle", + desc = "Location List (Trouble)", + }, + { + "xQ", + "Trouble qflist toggle", + desc = "Quickfix List (Trouble)", + }, + }, + }, { "f-person/git-blame.nvim", enabled = false, diff --git a/lua/taken/plugins/trouble.lua b/lua/taken/plugins/trouble.lua new file mode 100644 index 0000000..dec7420 --- /dev/null +++ b/lua/taken/plugins/trouble.lua @@ -0,0 +1,38 @@ +return { + "folke/trouble.nvim", + dependencies = { "nvim-tree/nvim-web-devicons" }, + cmd = "Trouble", + config = true, + keys = { + { + "xx", + "Trouble diagnostics toggle", + desc = "Diagnostics (Trouble)", + }, + { + "xX", + "Trouble diagnostics toggle filter.buf=0", + desc = "Buffer Diagnostics (Trouble)", + }, + { + "xs", + "Trouble symbols toggle focus=false", + desc = "Symbols (Trouble)", + }, + { + "xl", + "Trouble lsp toggle focus=false win.position=right", + desc = "LSP Definitions / references / ... (Trouble)", + }, + { + "xL", + "Trouble loclist toggle", + desc = "Location List (Trouble)", + }, + { + "xQ", + "Trouble qflist toggle", + desc = "Quickfix List (Trouble)", + }, + }, +}