feat(nvim): configure mbbill/undotree

This commit is contained in:
2022-12-23 02:32:21 +01:00
parent af6f94cbdc
commit 8a90fd35f5
10 changed files with 138 additions and 155 deletions

View File

@@ -32,6 +32,7 @@ map("n", "<leader>e", "<cmd>lua vim.lsp.buf.hover()<CR>", { silent = true })
map("n", "<Leader>rn", "<cmd>lua vim.lsp.buf.rename()<CR>", options)
map({ "n", "v" }, "<leader>c", "<cmd>Lspsaga code_action<CR>", { silent = true })
map({ "n", "v" }, "gr", "<cmd>Lspsaga lsp_finder<CR>", options)
map("n", "<S-U>", ":UndotreeToggle<CR>", options)
map("n", "<leader>t", ":TroubleToggle<CR>", remap)

View File

@@ -15,6 +15,8 @@ set.expandtab = true -- Converts tabs to spaces
set.autoindent = true -- Good auto indent
set.autochdir = false -- Your working directory will always be the same as your working directory
set.incsearch = true -- sets incremental search
set.undofile = true;
set.undodir = vim.fn.stdpath('data') .. '/undo'
set.shell = "/bin/zsh" -- Set your shell to bash or zsh
set.shortmess:append("sI") -- Disable nvim intro
vim.cmd([[set nobackup]]) -- creates a backup file

View File

@@ -13,13 +13,19 @@ local plugins = {
--------------------
-- Layout Plugins --
--------------------
{ "mbbill/undotree", lazy = false },
{
"petertriho/nvim-scrollbar",
config = function()
require("configs.scrollbar")
end,
},
{
"stevearc/dressing.nvim",
config = function()
require("dressing")
end,
},
{
"lewis6991/gitsigns.nvim",
config = function()
@@ -162,6 +168,18 @@ local plugins = {
--------------------
-- IDE Type Stuff --
--------------------
{
"jackMort/ChatGPT.nvim",
command = "ChatGPT",
config = function()
require("chatgpt").setup({
-- optional configuration
})
end,
dependencies = {
"MunifTanjim/nui.nvim",
}
},
{
"ThePrimeagen/git-worktree.nvim",
config = function()
@@ -169,9 +187,11 @@ local plugins = {
end,
},
{
"GnikDroy/projections.nvim",
"olimorris/persisted.nvim",
lazy = false,
config = function()
require("configs.sessions")
require("persisted").setup()
require("telescope").load_extension("persisted") -- To load the telescope extension
end,
},
-- Dap Debugger -- Have not yet been able to set this up
@@ -211,6 +231,6 @@ local plugins = {
"kristijanhusak/vim-dadbod-ui",
}
local opts = { defaults = { lazy = true } }
local opts = { defaults = { lazy = true }, install = { colorscheme = { "catppuccin" } } }
require("lazy").setup(plugins, opts)