feat(nvim): configure mbbill/undotree
This commit is contained in:
parent
af6f94cbdc
commit
8a90fd35f5
@ -1,6 +1,11 @@
|
||||
{
|
||||
"$schema": "https://raw.githubusercontent.com/sumneko/vscode-lua/master/setting/schema.json",
|
||||
"Lua.diagnostics.globals": ["require", "vim", "pcall"],
|
||||
"Lua.completion.autoRequire": false,
|
||||
"Lua.diagnostics.globals": [
|
||||
"require",
|
||||
"vim",
|
||||
"pcall"
|
||||
],
|
||||
"Lua.workspace.library": [
|
||||
"/home/max/.config/nvim",
|
||||
"/home/max/.local/share/nvim/site",
|
||||
|
@ -1,8 +1,4 @@
|
||||
-- pcall(require, "impatient")
|
||||
--
|
||||
--
|
||||
require("core.bootstrap")
|
||||
|
||||
require("core.plugins")
|
||||
|
||||
require("core.options")
|
||||
|
@ -1,8 +1,9 @@
|
||||
{
|
||||
"ChatGPT.nvim": { "branch": "main", "commit": "e9feafe55e3b42f2b23dff74c5f975a93cc9967a" },
|
||||
"Comment.nvim": { "branch": "master", "commit": "5f01c1a89adafc52bf34e3bf690f80d9d726715d" },
|
||||
"LuaSnip": { "branch": "master", "commit": "8b25e74761eead3dc47ce04b5e017fd23da7ad7e" },
|
||||
"LuaSnip": { "branch": "master", "commit": "5570fd797eae0790affb54ea669a150cad76db5d" },
|
||||
"alpha-nvim": { "branch": "main", "commit": "21a0f2520ad3a7c32c0822f943368dc063a569fb" },
|
||||
"autolist.nvim": { "branch": "main", "commit": "aaadfa9a0d4de1c7628eb3cb7ee811dc94872ef8" },
|
||||
"autolist.nvim": { "branch": "main", "commit": "f600383a7ad97de236e7d968a74a4c4f847ae03d" },
|
||||
"boole.nvim": { "branch": "main", "commit": "d059fd7da634aaaabddbb280709f92effd9f2dba" },
|
||||
"catppuccin": { "branch": "main", "commit": "55f43a952856bc0029e6cef066297c6cfab3451d" },
|
||||
"cmp-calc": { "branch": "main", "commit": "50792f34a628ea6eb31d2c90e8df174671e4e7a0" },
|
||||
@ -14,44 +15,46 @@
|
||||
"cmp_luasnip": { "branch": "master", "commit": "18095520391186d634a0045dacaa346291096566" },
|
||||
"copilot-cmp": { "branch": "master", "commit": "84d5a0e8e4d1638e7554899cb7b642fa24cf463f" },
|
||||
"copilot.lua": { "branch": "master", "commit": "81eb5d1bc2eddad5ff0b4e3c1c4be5c09bdfaa63" },
|
||||
"dressing.nvim": { "branch": "master", "commit": "4436d6f41e2f6b8ada57588acd1a9f8b3d21453c" },
|
||||
"editorconfig-vim": { "branch": "master", "commit": "30ddc057f71287c3ac2beca876e7ae6d5abe26a0" },
|
||||
"friendly-snippets": { "branch": "main", "commit": "1a6a02350568d6830bcfa167c72f9b6e75e454ae" },
|
||||
"fwatch.nvim": { "branch": "main", "commit": "a691f7349dc66285cd75a1a698dd28bca45f2bf8" },
|
||||
"fzf": { "branch": "master", "commit": "6d14573fd038e9b9789e1250fb194b67ff2e2d06" },
|
||||
"fzf": { "branch": "master", "commit": "73162a4bc3403e3532afa8a95008a3b4a00d554a" },
|
||||
"git-conflict.nvim": { "branch": "main", "commit": "77faa75c09a6af88e7b54d8d456327e06611f7ea" },
|
||||
"git-worktree.nvim": { "branch": "master", "commit": "d7f4e2584e81670154f07ca9fa5dd791d9c1b458" },
|
||||
"gitsigns.nvim": { "branch": "main", "commit": "2ab3bdf0a40bab53033048c6be75bda86316b55d" },
|
||||
"harpoon": { "branch": "master", "commit": "21d0d1bfa3000e4384740bfaefa0ebc51c773786" },
|
||||
"lazy.nvim": { "branch": "main", "commit": "2927b0597e1860ec3eb87d354018dc3e1d1b55e0" },
|
||||
"lazy.nvim": { "branch": "main", "commit": "e5dcc871491eadc5ed98e633afc519670e71c4a1" },
|
||||
"leap.nvim": { "branch": "main", "commit": "a5c9504290832e6bdbbb6265fd1ff02fc6485d20" },
|
||||
"lsp_lines.nvim": { "branch": "main", "commit": "ec98b45c8280e5ef8c84028d4f38aa447276c002" },
|
||||
"lspkind.nvim": { "branch": "master", "commit": "c68b3a003483cf382428a43035079f78474cd11e" },
|
||||
"lspsaga.nvim": { "branch": "main", "commit": "b7b4777369b441341b2dcd45c738ea4167c11c9e" },
|
||||
"lualine-lsp-progress": { "branch": "master", "commit": "56842d097245a08d77912edf5f2a69ba29f275d7" },
|
||||
"lualine.nvim": { "branch": "master", "commit": "bfa0d99ba6f98d077dd91779841f1c88b7b5c165" },
|
||||
"lualine.nvim": { "branch": "master", "commit": "fffbcb829288c3ca366f17cdb8d46aefb5c1d6f3" },
|
||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "5bea0e851b8f48479d2cb927cd26733b4058b2b3" },
|
||||
"mason.nvim": { "branch": "main", "commit": "dd04b4105e84620685c37efb6ca935d282e11465" },
|
||||
"mason.nvim": { "branch": "main", "commit": "e6f6f901959d39d112b096d26b909c65723981d3" },
|
||||
"neotest": { "branch": "master", "commit": "de2f68fb13a05c361e0c096e167f7f79712f3a5c" },
|
||||
"null-ls.nvim": { "branch": "main", "commit": "db1c7cb5f6d6f6036b7f8433bb3cfcbe985cb3d1" },
|
||||
"nui.nvim": { "branch": "main", "commit": "b12db5321c194c10eb34e610fb76ce2c058853fc" },
|
||||
"null-ls.nvim": { "branch": "main", "commit": "ef9010b2ac11e2068a8e1d5a4eff576289a1f9a4" },
|
||||
"nvim-autopairs": { "branch": "master", "commit": "b5994e6547d64f781cfca853a1aa6174d238fe0e" },
|
||||
"nvim-cmp": { "branch": "main", "commit": "8868cf9a09e5f3c2612a22ccb82dcc6d9f0d0d35" },
|
||||
"nvim-dap": { "branch": "master", "commit": "284c754f60f6ef15ecdd071524b945cb2fffbbb9" },
|
||||
"nvim-dap": { "branch": "master", "commit": "6f2ea9e33b48a51849ec93c6c38148a5372018e4" },
|
||||
"nvim-dap-ui": { "branch": "master", "commit": "54365d2eb4cb9cfab0371306c6a76c913c5a67e3" },
|
||||
"nvim-dap-vscode-js": { "branch": "main", "commit": "e7c05495934a658c8aa10afd995dacd796f76091" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "d597b0f3605f43526f1b6948c6d7ca2919ea32ac" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "25f0c65bd8fddadbafd0048a68560bf160ceb98c" },
|
||||
"nvim-notify": { "branch": "master", "commit": "b005821516f1f37801a73067afd1cef2dbc4dfe8" },
|
||||
"nvim-scrollbar": { "branch": "main", "commit": "f45aecbba9c402282dfc99721e0ad4c08710907c" },
|
||||
"nvim-toggleterm.lua": { "branch": "main", "commit": "b02a1674bd0010d7982b056fd3df4f717ff8a57a" },
|
||||
"nvim-tree.lua": { "branch": "master", "commit": "e14c2895b4f36a22001f7773244041c173dcf867" },
|
||||
"nvim-treesitter": { "branch": "master", "commit": "eedb7b9c69b13afe86461b0742266bb62b811ece" },
|
||||
"nvim-treesitter": { "branch": "master", "commit": "895d4a1202f36df561ba032c93b9deb72e1edee8" },
|
||||
"nvim-web-devicons": { "branch": "master", "commit": "05e1072f63f6c194ac6e867b567e6b437d3d4622" },
|
||||
"persisted.nvim": { "branch": "main", "commit": "558fc4b9f48e16008782240521cb72455d93b835" },
|
||||
"plenary.nvim": { "branch": "master", "commit": "4b7e52044bbb84242158d977a50c4cbcd85070c7" },
|
||||
"popup.nvim": { "branch": "master", "commit": "b7404d35d5d3548a82149238289fa71f7f6de4ac" },
|
||||
"projections.nvim": { "branch": "main", "commit": "7aecd9d9d516e7db92d2294c4b331c31f578bf86" },
|
||||
"sniprun": { "branch": "master", "commit": "c37086a0d12b2053bf147c2f4643c0c92318c0c2" },
|
||||
"telescope.nvim": { "branch": "master", "commit": "cabf991b1d3996fa6f3232327fc649bbdf676496" },
|
||||
"telescope.nvim": { "branch": "master", "commit": "e960efa60e97df58e089b00270f09d60f27202c8" },
|
||||
"translate.nvim": { "branch": "main", "commit": "7b2fd50c21ecfe536d572d62dcd3fa83acad3743" },
|
||||
"trouble.nvim": { "branch": "main", "commit": "897542f90050c3230856bc6e45de58b94c700bbf" },
|
||||
"undotree": { "branch": "master", "commit": "1a23ea84bd02c34f50d8e10a8b4bfc89597ffe4e" },
|
||||
"vim-dadbod": { "branch": "master", "commit": "34151ccce9f5ff16229b8e482a97e46997914cb3" },
|
||||
"vim-dadbod-ui": { "branch": "master", "commit": "6a2b841d2f0b82386c637ce4e9954ae12c7eaee8" },
|
||||
"vim-surround": { "branch": "master", "commit": "3d188ed2113431cf8dac77be61b842acb64433d9" }
|
||||
|
@ -26,9 +26,10 @@ dashboard.section.footer.val = {
|
||||
dashboard.section.buttons.val = {
|
||||
dashboard.button("n", " Create New file", ":set laststatus=3 | :ene <BAR> startinsert <CR>"),
|
||||
dashboard.button("e", " Open File Manager", ":set laststatus=3 | :NvimTreeOpen <CR>"),
|
||||
dashboard.button("s", "Δ Search Sessions", ":Telescope persisted<CR>"),
|
||||
dashboard.button("v", " Neovim Settings ", ":set laststatus=3 | e ~/.config/nvim/init.lua <CR>"),
|
||||
dashboard.button("b", "⟳ Recent Files", ":Telescope oldfiles<CR>"),
|
||||
dashboard.button("s", " Shell Configuration", ":set laststatus=3 | e ~/.config/zsh/.zshrc <CR>"),
|
||||
-- dashboard.button("s", " Shell Configuration", ":set laststatus=3 | e ~/.config/zsh/.zshrc <CR>"),
|
||||
dashboard.button("u", " Update Nvim Plugins", ":Lazy update <CR>"),
|
||||
dashboard.button("q", " Quit Neovim", ":qa<CR>"),
|
||||
}
|
||||
@ -51,22 +52,24 @@ dashboard.section.header.val = {
|
||||
[[\/____\/ ]],
|
||||
}
|
||||
|
||||
dashboard.section.header.val = {
|
||||
[[ ____]],
|
||||
[[ /\ \]],
|
||||
[[ / \ \]],
|
||||
[[ / \ \]],
|
||||
[[ / \ \]],
|
||||
[[ / /\ \ \]],
|
||||
[[ / / \ \ \]],
|
||||
[[ / / \ \ \]],
|
||||
[[ / / / \ \ \]],
|
||||
[[ / / / \ \ \]],
|
||||
[[ / / /---------' \]],
|
||||
[[/ / /_______________\]],
|
||||
[[\ / /]],
|
||||
[[ \/_____________________/ ]],
|
||||
}
|
||||
-- dashboard.section.header.val = {
|
||||
-- [[ ____]],
|
||||
-- [[ /\ \]],
|
||||
-- [[ / \ \]],
|
||||
-- [[ / \ \]],
|
||||
-- [[ / \ \]],
|
||||
-- [[ / /\ \ \]],
|
||||
-- [[ / / \ \ \]],
|
||||
-- [[ / / \ \ \]],
|
||||
-- [[ / / / \ \ \]],
|
||||
-- [[ / / / \ \ \]],
|
||||
-- [[ / / /---------' \]],
|
||||
-- [[/ / /_______________\]],
|
||||
-- [[\ / /]],
|
||||
-- [[ \/_____________________/ ]],
|
||||
-- }
|
||||
|
||||
|
||||
-- Layout For Luavim ascii art
|
||||
dashboard.config.layout = {
|
||||
{ type = "padding", val = 5 },
|
||||
|
@ -1,68 +1,13 @@
|
||||
local Workspace = require("projections.workspace")
|
||||
local Session = require("projections.session")
|
||||
|
||||
require("projections").setup({
|
||||
workspaces = { "~/Projects" }, -- Default workspaces to search for
|
||||
patterns = { ".git", ".svn", ".hg" }, -- Patterns to search for, these are NOT regexp
|
||||
store_hooks = {
|
||||
pre = function()
|
||||
require("nvim-tree").close()
|
||||
require("persistence").setup({
|
||||
autoload = true,
|
||||
use_git_branch = false,
|
||||
before_save = function()
|
||||
pcall(vim.cmd, ":NvimTreeClose")
|
||||
end,
|
||||
},
|
||||
restore_hooks = {
|
||||
post = function()
|
||||
require("nvim-tree").open()
|
||||
after_source = function()
|
||||
-- Reload the LSP servers
|
||||
vim.lsp.stop_client(vim.lsp.get_active_clients())
|
||||
pcall(vim.cmd, ":NvimTreeOpen");
|
||||
end,
|
||||
},
|
||||
dir = vim.fn.stdpath('data') .. '/sessions/'
|
||||
})
|
||||
|
||||
vim.keymap.set("n", "<leader>o", function()
|
||||
local find_projects = require("telescope").extensions.projections.projections
|
||||
find_projects({
|
||||
action = function(selection)
|
||||
-- chdir is required since there might not be a session file
|
||||
vim.fn.chdir(selection.value)
|
||||
Session.restore(selection.value)
|
||||
end,
|
||||
})
|
||||
end, { desc = "Find projects" })
|
||||
|
||||
vim.api.nvim_create_autocmd({ "DirChangedPre", "VimLeavePre" }, {
|
||||
callback = function()
|
||||
Session.store(vim.loop.cwd())
|
||||
end,
|
||||
desc = "Store project session",
|
||||
})
|
||||
|
||||
vim.api.nvim_create_autocmd({ "VimEnter" }, {
|
||||
callback = function()
|
||||
if 0 then
|
||||
return
|
||||
end
|
||||
local session_info = Session.info(vim.loop.cwd())
|
||||
if session_info == nil then
|
||||
Session.restore_latest()
|
||||
else
|
||||
Session.restore(vim.loop.cwd())
|
||||
end
|
||||
end,
|
||||
desc = "Restore last session automatically",
|
||||
})
|
||||
|
||||
vim.api.nvim_create_user_command("RestoreSession", function()
|
||||
local session_info = Session.info(vim.loop.cwd())
|
||||
if session_info == nil then
|
||||
Session.restore_latest()
|
||||
else
|
||||
Session.restore(vim.loop.cwd())
|
||||
end
|
||||
end, {})
|
||||
|
||||
vim.api.nvim_create_user_command("SaveSession", function()
|
||||
Session.store(vim.loop.cwd())
|
||||
end, {})
|
||||
|
||||
-- Add workspace command
|
||||
vim.api.nvim_create_user_command("AddWorkspace", function()
|
||||
Workspace.add(vim.loop.cwd())
|
||||
end, {})
|
||||
|
@ -8,6 +8,11 @@ local function open_with_trouble()
|
||||
end
|
||||
|
||||
local default = {
|
||||
extensions = {
|
||||
sessions_picker = {
|
||||
sessions_dir = vim.fn.stdpath('data') .. '/sessions/',
|
||||
}
|
||||
},
|
||||
defaults = {
|
||||
vimgrep_arguments = {
|
||||
"rg",
|
||||
@ -61,9 +66,5 @@ local default = {
|
||||
}
|
||||
|
||||
telescope.setup(default)
|
||||
-- telescope.load_extension("themes");
|
||||
--
|
||||
-- telescope.load_extension("harpoon")
|
||||
telescope.load_extension("projections")
|
||||
telescope.load_extension("git_worktree")
|
||||
telescope.load_extension("notify")
|
||||
|
@ -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)
|
||||
|
||||
|
@ -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
|
||||
|
@ -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)
|
||||
|
@ -24,6 +24,13 @@ return {
|
||||
alternate_buffer_wheel_scroll_speed = 1,
|
||||
color_scheme = scheme_for_appearance(wezterm.gui.get_appearance()),
|
||||
window_close_confirmation = "AlwaysPrompt",
|
||||
keys = {
|
||||
{
|
||||
key = 'U',
|
||||
mods = 'CMD|SHIFT',
|
||||
action = wezterm.action.Nop,
|
||||
},
|
||||
},
|
||||
window_padding = {
|
||||
left = padding,
|
||||
right = padding,
|
||||
|
Loading…
Reference in New Issue
Block a user