From 153aee53334b18ed1839be28286334fd92ff6ba2 Mon Sep 17 00:00:00 2001 From: rootiest Date: Mon, 16 Sep 2024 06:34:35 -0400 Subject: [PATCH] refactor: update UndoTree plugin configuration for better user experience --- lua/plugins/editor.lua | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/lua/plugins/editor.lua b/lua/plugins/editor.lua index 554344c..9055b3c 100644 --- a/lua/plugins/editor.lua +++ b/lua/plugins/editor.lua @@ -24,13 +24,6 @@ return { { -- Treesitter-context import = "lazyvim.plugins.extras.ui.treesitter-context", }, - { -- Mini.Indentscope - import = "lazyvim.plugins.extras.ui.mini-indentscope", - }, - { -- Mini Indentscope - "echasnovski/mini.indentscope", - opts = data.types.miniindentscope, - }, { -- Navic import = "lazyvim.plugins.extras.editor.navic", }, @@ -134,13 +127,29 @@ return { }, { -- UndoTree "mbbill/undotree", - opts = {}, + lazy = false, + config = function() + -- Layout + vim.g.undotree_ShortIndicators = 0 + vim.g.undotree_SplitWidth = 32 + -- Set focus to the tree when it's toggled + vim.g.undotree_SetFocusWhenToggle = 1 + -- Set up tree shape + vim.g.undotree_TreeNodeShape = "" + vim.g.undotree_TreeVertShape = "" + vim.g.undotree_TreeSplitShape = "" + vim.g.undotree_TreeReturnShape = "" + -- Hide helpline + vim.g.undotree_HelpLine = 0 + -- Hide diff panel + vim.g.undotree_DiffAutoOpen = 0 + end, keys = data.keys.undotree, }, { -- NumberToggle "sitiom/nvim-numbertoggle", }, - { + { -- Noice "folke/noice.nvim", optional = true, opts = data.types.noice,