add lazygit and bufferline. Do some cleanup as well

This commit is contained in:
Preston Baxter 2023-11-14 12:34:13 -06:00
parent 0effd04260
commit 4fc4ed290f
6 changed files with 49 additions and 64 deletions

View File

@ -0,0 +1,11 @@
vim.opt.termguicolors = true
require("bufferline").setup{
options = {
hover = {
enabled = true,
delay = 150,
reveal = {'close'}
}
}
}

View File

@ -1,29 +0,0 @@
vim.keymap.set("n", "<leader>gs", vim.cmd.Git)
local ThePrimeagen_Fugitive = vim.api.nvim_create_augroup("ThePrimeagen_Fugitive", {})
local autocmd = vim.api.nvim_create_autocmd
autocmd("BufWinEnter", {
group = ThePrimeagen_Fugitive,
pattern = "*",
callback = function()
if vim.bo.ft ~= "fugitive" then
return
end
local bufnr = vim.api.nvim_get_current_buf()
local opts = {buffer = bufnr, remap = false}
vim.keymap.set("n", "<leader>p", function()
vim.cmd.Git('push')
end, opts)
-- rebase always
vim.keymap.set("n", "<leader>P", function()
vim.cmd.Git({'pull', '--rebase'})
end, opts)
-- NOTE: It allows me to easily set the branch i am pushing and any tracking
-- needed if i did not set the branch up correctly
vim.keymap.set("n", "<leader>t", ":Git push -u origin ", opts);
end,
})

View File

@ -1,8 +0,0 @@
local mark = require("harpoon.mark")
local ui = require("harpoon.ui")
vim.keymap.set("n", "<leader>a", mark.add_file)
vim.keymap.set("n", "<C-e>", ui.toggle_quick_menu)

13
after/plugin/lazygit.lua Normal file
View File

@ -0,0 +1,13 @@
vim.g.lazygit_floating_window_winblend = 0 -- transparency of floating window
vim.g.lazygit_floating_window_scaling_factor = 0.9 -- scaling factor for floating window
vim.g.lazygit_floating_window_border_chars = {'','', '', '', '','', '', ''} -- customize lazygit popup window border characters
vim.g.lazygit_floating_window_use_plenary = 0 -- use plenary.nvim to manage floating window if available
vim.g.lazygit_use_neovim_remote = 1 -- fallback to 0 if neovim-remote is not installed
vim.g.lazygit_use_custom_config_file_path = 0 -- config file path is evaluated if this value is 1
vim.g.lazygit_config_file_path = '' -- custom config file path
-- OR
vim.g.lazygit_config_file_path = {} -- table of custom config file paths
vim.keymap.set("n", "<leader>gg", "<cmd>LazyGit<CR>")

View File

@ -1,5 +1,6 @@
{
"LuaSnip": { "branch": "master", "commit": "46c91e814732c1630b8a8b50d04acbf54b8320fa" },
"bufferline.nvim": { "branch": "main", "commit": "6ecd37e0fa8b156099daedd2191130e083fb1490" },
"cellular-automaton.nvim": { "branch": "main", "commit": "b7d056dab963b5d3f2c560d92937cb51db61cb5b" },
"cloak.nvim": { "branch": "main", "commit": "951b163e55ce7639eb320c450bde9283c4fe968b" },
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
@ -8,8 +9,8 @@
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
"cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" },
"friendly-snippets": { "branch": "main", "commit": "43727c2ff84240e55d4069ec3e6158d74cb534b6" },
"harpoon": { "branch": "master", "commit": "c1aebbad9e3d13f20bedb8f2ce8b3a94e39e424a" },
"lazy.nvim": { "branch": "main", "commit": "96584866b9c5e998cbae300594d0ccfd0c464627" },
"lazygit.nvim": { "branch": "main", "commit": "de35012036d43bca03628d40d083f7c02a4cda3f" },
"lsp-zero.nvim": { "branch": "v1.x", "commit": "c51a9104de7fddff2351361d2dbcbd8d08600ef4" },
"lsp_signature.nvim": { "branch": "master", "commit": "1fba8f477b8c65add5e07cda0504cf7f81a9a4ab" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "6eb8cae80f2e4322ec82cd9f8fa423f6d1eb02c3" },
@ -18,11 +19,10 @@
"nvim-lspconfig": { "branch": "master", "commit": "b0852218bc5fa6514a71a9da6d5cfa63a263c83d" },
"nvim-spectre": { "branch": "master", "commit": "3eb207fcafb6522e1ed531d760af3ef896cce030" },
"nvim-tree.lua": { "branch": "master", "commit": "a2aaf8b430c11af36b869cf1c0ad2f7c8ceeaf2c" },
"nvim-treesitter": { "branch": "master", "commit": "c543ffae1c34a92fb647505f2165b35f68c113c4" },
"nvim-treesitter": { "branch": "master", "commit": "c0da2013d1cef768c00f3f0b7f365fe19a10bca3" },
"nvim-treesitter-context": { "branch": "master", "commit": "2806d83e3965017382ce08792ee527e708fa1bd4" },
"nvim-web-devicons": { "branch": "master", "commit": "47103b80c38c59f7a1b5408c232b92bf5d018651" },
"onedark": { "branch": "master", "commit": "b9acd92ded2ba155867ca5af9d618e933d96e3b0" },
"playground": { "branch": "master", "commit": "ba48c6a62a280eefb7c85725b0915e021a1a0749" },
"plenary.nvim": { "branch": "master", "commit": "50012918b2fc8357b87cff2a7f7f0446e47da174" },
"refactoring.nvim": { "branch": "master", "commit": "156532476deb10b1b2a32cb38e1078b3f9951c42" },
"telescope.nvim": { "branch": "master", "commit": "b79cd6c88b3d96b0f49cb7d240807cd59b610cd8" },

View File

@ -17,7 +17,6 @@ return require('lazy').setup({
-- or , branch = '0.1.x',
dependencies = { { 'nvim-lua/plenary.nvim' } }
},
{
'navarasu/onedark.nvim',
name = 'onedark',
@ -25,7 +24,6 @@ return require('lazy').setup({
vim.cmd('colorscheme onedark')
end
},
{
"folke/trouble.nvim",
dependencies = {"nvim-tree/nvim-web-devicons"},
@ -38,28 +36,20 @@ return require('lazy').setup({
},
},
{
'nvim-treesitter/nvim-treesitter',
opts = {
highlight = {enable = true},
indent = {enable = true},
ensure_installed = {
"bash",
"go",
"rust",
"html",
"toml",
"json",
"yaml",
"markdown",
"htmx",
"templ",
"lua"
},
}
},
"nvim-treesitter/playground",
"theprimeagen/harpoon",
{
"nvim-treesitter/nvim-treesitter",
build = ":TSUpdate",
config = function ()
local configs = require("nvim-treesitter.configs")
configs.setup({
ensure_installed = { "c", "lua", "vim", "vimdoc", "query", "javascript", "html", "go", "yaml", "bash" },
sync_install = false,
highlight = { enable = true },
indent = { enable = true },
})
end
},
"theprimeagen/refactoring.nvim",
"mbbill/undotree",
"nvim-pack/nvim-spectre",
@ -102,4 +92,12 @@ return require('lazy').setup({
opts = {},
config = function(_, opts) require'lsp_signature'.setup(opts) end
},
{'akinsho/bufferline.nvim', version = "*", dependencies = 'nvim-tree/nvim-web-devicons'},
{
"kdheepak/lazygit.nvim",
-- optional for floating window border decoration
dependencies = {
"nvim-lua/plenary.nvim",
},
},
})