From 5a4dd97777accb1a98a261f9d4ebde0d0cb5e9ec Mon Sep 17 00:00:00 2001 From: Andrei Stoica Date: Sat, 3 Feb 2024 18:07:53 -0500 Subject: [PATCH] nvim undotree and diffview --- .nvchad-custom/plugins.lua | 46 +++++++++++++++++++++++++++++++++++--- 1 file changed, 43 insertions(+), 3 deletions(-) diff --git a/.nvchad-custom/plugins.lua b/.nvchad-custom/plugins.lua index 315c457..8a0f07c 100644 --- a/.nvchad-custom/plugins.lua +++ b/.nvchad-custom/plugins.lua @@ -8,8 +8,7 @@ local plugins = { context = 20, expand = { "function", - }, - }, + }, }, lazy = false, }, { @@ -112,7 +111,48 @@ local plugins = { lazy = false, }, - { "NvChad/nvterm", enabled = false }, + { + "debugloop/telescope-undo.nvim", + dependencies = { -- note how they're inverted to above example + { + "nvim-telescope/telescope.nvim", + dependencies = { "nvim-lua/plenary.nvim" }, + }, + }, + keys = { + { -- lazy style key map + "u", + "Telescope undo", + desc = "undo history", + }, + }, + opts = { + -- don't use `defaults = { }` here, do this in the main telescope spec + extensions = { + undo = { + -- telescope-undo.nvim config, see below + }, + -- no other extensions here, they can have their own spec too + }, + }, + config = function(_, opts) + -- Calling telescope's setup from multiple specs does not hurt, it will happily merge the + -- configs for us. We won't use data, as everything is in it's own namespace (telescope + -- defaults, as well as each extension). + require("telescope").setup(opts) + require("telescope").load_extension("undo") + end, + }, + + { + "sindrets/diffview.nvim", + lazy = false, + }, + + { + "NvChad/nvterm", + enabled = false, + }, -- To make a plugin not be loaded -- {