I am learning to use NeoVim and have started with the NvChad base configuration and have setup a basic python LSP in it.
I recently saw a video where a person was using a plugin called UndoTree and wanted to install it in my setup, but I cannot seem to install it.
Here is my plugins.lua file which contains all the plugins for the lazy.nvim package manager
local plugins = {
{
"williamboman/mason.nvim",
opts = {
ensure_installed = {
"black",
"pyright",
"mypy",
"ruff",
},
},
},
{
"neovim/nvim-lspconfig",
config = function ()
require "plugins.configs.lspconfig"
require "custom.configs.lspconfig"
end
},
-- Python Language Support
{
"jose-elias-alvarez/null-ls.nvim",
ft = {"python"},
opts = function ()
return require "custom.configs.null-ls"
end
},
-- Undo-Tree
-- Added this plugin
{
"mbbill/undotree",
lazy = false,
config = function ()
return require "custom.configs.undotree"
end
},
}
return plugins
This is the custom configuration file I have written for the UndoTree Plugin
local undotree = require('undotree')
undotree.setup({
float_diff = true, -- using float window previews diff, set this `true` will disable layout option
layout = "left_bottom", -- "left_bottom", "left_left_bottom"
ignore_filetype = { 'Undotree', 'UndotreeDiff', 'qf', 'TelescopePrompt', 'spectre_panel', 'tsplayground' },
window = {
winblend = 30,
},
keymaps = {
['j'] = "move_next",
['k'] = "move_prev",
['J'] = "move_change_next",
['K'] = "move_change_prev",
['<cr>'] = "action_enter",
['p'] = "enter_diffbuf",
['q'] = "quit",
},
})
This is the error message I am getting after starting nvim
This is my :Lazy profile
output