From 4ae405e46c627cfb8be5ebbe64f5ed3851653287 Mon Sep 17 00:00:00 2001 From: goodhumored Date: Sun, 4 Aug 2024 09:46:08 +0300 Subject: [PATCH] neovim project, barbecue, barbar plugins --- .config/nvim/init.lua | 85 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 85 insertions(+) diff --git a/.config/nvim/init.lua b/.config/nvim/init.lua index 2db3398..8cc25f8 100644 --- a/.config/nvim/init.lua +++ b/.config/nvim/init.lua @@ -90,6 +90,10 @@ vim.keymap.set("n", "", "nohlsearch") -- Diagnostic keymaps vim.keymap.set("n", "q", vim.diagnostic.setloclist, { desc = "Open diagnostic [Q]uickfix list" }) +-- splitting +vim.keymap.set("n", "-", "sp", { desc = "Horizontal split" }) +vim.keymap.set("n", "|", "vsp", { desc = "Vertical split" }) + -- Exit terminal mode in the builtin terminal with a shortcut that is a bit easier -- for people to discover. Otherwise, you normally need to press , which -- is not what someone will guess without a bit more experience. @@ -1003,6 +1007,87 @@ require("lazy").setup({ vim.keymap.set({ "n", "v" }, "cc", "CBline", { desc = "[C]omment Simple [L]ine" }) end, }, + { + "utilyre/barbecue.nvim", + name = "barbecue", + version = "*", + dependencies = { + "SmiteshP/nvim-navic", + "nvim-tree/nvim-web-devicons", -- optional dependency + }, + opts = { + -- configurations go here + }, + }, + { + "romgrk/barbar.nvim", + dependencies = { + "lewis6991/gitsigns.nvim", -- OPTIONAL: for git status + "nvim-tree/nvim-web-devicons", -- OPTIONAL: for file icons + }, + init = function() + vim.g.barbar_auto_setup = false + end, + opts = { + sidebar_filetypes = { + -- Use the default values: {event = 'BufWinLeave', text = '', align = 'left'} + NvimTree = true, + -- Or, specify the text used for the offset: + undotree = { + text = "undotree", + align = "center", -- *optionally* specify an alignment (either 'left', 'center', or 'right') + }, + -- Or, specify the event which the sidebar executes when leaving: + ["neo-tree"] = { event = "BufWipeout" }, + -- Or, specify all three + Outline = { event = "BufWinLeave", text = "symbols-outline", align = "right" }, + }, + }, + version = "^1.0.0", -- optional: only update when a new 1.x version is released + }, + { + "coffebar/neovim-project", + opts = { + projects = { -- define project roots + "~/Projects/*", + "~/.config/*", + "~/side-hustle/*", + "~/Job/dipal/repos/*", + "~/Uni/*/*/*", + }, + }, + init = function() + -- enable saving the state of plugins in the session + vim.opt.sessionoptions:append("globals") -- save global variables that start with an uppercase letter and contain at least one lowercase letter. + end, + config = function() + vim.keymap.set( + { "n" }, + "pf", + "Telescope neovim-project discover", + { desc = "[P]rojects [F]ind" } + ) + vim.keymap.set( + { "n" }, + "pr", + "Telescope neovim-project history", + { desc = "[P]rojects [R]ecent" } + ) + vim.keymap.set( + { "n" }, + "pl", + "NeovimProjectLoadRecent", + { desc = "[P]rojects load [L]ast" } + ) + end, + dependencies = { + { "nvim-lua/plenary.nvim" }, + { "nvim-telescope/telescope.nvim", tag = "0.1.4" }, + { "Shatur/neovim-session-manager" }, + }, + lazy = false, + priority = 100, + }, }, -- The following two comments only work if you have downloaded the kickstart repo, not just copy pasted the -- init.lua. If you want these files, they are in the repository, so you can just download them and