install additional plugins, converted from kickstart-based config

This commit is contained in:
Baipyrus 2024-11-02 03:01:00 +01:00
parent c5a53918be
commit 37d246d9ec
9 changed files with 185 additions and 0 deletions

View File

@ -10,10 +10,12 @@
"cmp-nvim-lsp": { "branch": "main", "commit": "39e2eda76828d88b773cc27a3f61d2ad782c922d" }, "cmp-nvim-lsp": { "branch": "main", "commit": "39e2eda76828d88b773cc27a3f61d2ad782c922d" },
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" }, "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
"cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" }, "cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" },
"conflict-marker.vim": { "branch": "master", "commit": "62742b2ffe7a433988759c67b5c5a22eff74a14b" },
"conform.nvim": { "branch": "master", "commit": "4dd429fe3f47077f4e50cdaf03f7877ce9b213e0" }, "conform.nvim": { "branch": "master", "commit": "4dd429fe3f47077f4e50cdaf03f7877ce9b213e0" },
"crates.nvim": { "branch": "main", "commit": "8bf8358ee326d5d8c11dcd7ac0bcc9ff97dbc785" }, "crates.nvim": { "branch": "main", "commit": "8bf8358ee326d5d8c11dcd7ac0bcc9ff97dbc785" },
"dashboard-nvim": { "branch": "master", "commit": "d2c5a4d1341f5ca1ed2ecb4ecfcff2bc8ea18b14" }, "dashboard-nvim": { "branch": "master", "commit": "d2c5a4d1341f5ca1ed2ecb4ecfcff2bc8ea18b14" },
"dressing.nvim": { "branch": "master", "commit": "1b7921eecc65af1baf8ac1dc06f0794934cbcfb2" }, "dressing.nvim": { "branch": "master", "commit": "1b7921eecc65af1baf8ac1dc06f0794934cbcfb2" },
"fidget.nvim": { "branch": "main", "commit": "e2a175c2abe2d4f65357da1c98c59a5cfb2b543f" },
"flash.nvim": { "branch": "main", "commit": "34c7be146a91fec3555c33fe89c7d643f6ef5cf1" }, "flash.nvim": { "branch": "main", "commit": "34c7be146a91fec3555c33fe89c7d643f6ef5cf1" },
"friendly-snippets": { "branch": "main", "commit": "de8fce94985873666bd9712ea3e49ee17aadb1ed" }, "friendly-snippets": { "branch": "main", "commit": "de8fce94985873666bd9712ea3e49ee17aadb1ed" },
"gitsigns.nvim": { "branch": "main", "commit": "7c27a30450130cd59c4994a6755e3c5d74d83e76" }, "gitsigns.nvim": { "branch": "main", "commit": "7c27a30450130cd59c4994a6755e3c5d74d83e76" },
@ -21,6 +23,7 @@
"indent-blankline.nvim": { "branch": "master", "commit": "04e44b09ee3ff189c69ab082edac1ef7ae2e256c" }, "indent-blankline.nvim": { "branch": "master", "commit": "04e44b09ee3ff189c69ab082edac1ef7ae2e256c" },
"lazy.nvim": { "branch": "main", "commit": "077102c5bfc578693f12377846d427f49bc50076" }, "lazy.nvim": { "branch": "main", "commit": "077102c5bfc578693f12377846d427f49bc50076" },
"lazydev.nvim": { "branch": "main", "commit": "d5800897d9180cea800023f2429bce0a94ed6064" }, "lazydev.nvim": { "branch": "main", "commit": "d5800897d9180cea800023f2429bce0a94ed6064" },
"lazygit": { "branch": "master", "commit": "095eb130e9c141a91cf7c4dc9c26f11a07824fec" },
"lualine.nvim": { "branch": "master", "commit": "640260d7c2d98779cab89b1e7088ab14ea354a02" }, "lualine.nvim": { "branch": "master", "commit": "640260d7c2d98779cab89b1e7088ab14ea354a02" },
"luvit-meta": { "branch": "main", "commit": "ce76f6f6cdc9201523a5875a4471dcfe0186eb60" }, "luvit-meta": { "branch": "main", "commit": "ce76f6f6cdc9201523a5875a4471dcfe0186eb60" },
"markdown-preview.nvim": { "branch": "master", "commit": "a923f5fc5ba36a3b17e289dc35dc17f66d0548ee" }, "markdown-preview.nvim": { "branch": "master", "commit": "a923f5fc5ba36a3b17e289dc35dc17f66d0548ee" },
@ -29,6 +32,7 @@
"mini.ai": { "branch": "main", "commit": "9b9b7cfa38b4871c3e44cfe89cf6d53fd40684d9" }, "mini.ai": { "branch": "main", "commit": "9b9b7cfa38b4871c3e44cfe89cf6d53fd40684d9" },
"mini.icons": { "branch": "main", "commit": "a2742459f0ee32806c2438ca06b4d8b331f3f4d4" }, "mini.icons": { "branch": "main", "commit": "a2742459f0ee32806c2438ca06b4d8b331f3f4d4" },
"mini.pairs": { "branch": "main", "commit": "7e834c5937d95364cc1740e20d673afe2d034cdb" }, "mini.pairs": { "branch": "main", "commit": "7e834c5937d95364cc1740e20d673afe2d034cdb" },
"mini.surround": { "branch": "main", "commit": "48a9795c9d352c771e1ab5dedab6063c0a2df037" },
"neo-tree.nvim": { "branch": "main", "commit": "a77af2e764c5ed4038d27d1c463fa49cd4794e07" }, "neo-tree.nvim": { "branch": "main", "commit": "a77af2e764c5ed4038d27d1c463fa49cd4794e07" },
"noice.nvim": { "branch": "main", "commit": "3cd84d402e0b5a56cf06b6c7f644a3cc9a3956a6" }, "noice.nvim": { "branch": "main", "commit": "3cd84d402e0b5a56cf06b6c7f644a3cc9a3956a6" },
"nui.nvim": { "branch": "main", "commit": "b58e2bfda5cea347c9d58b7f11cf3012c7b3953f" }, "nui.nvim": { "branch": "main", "commit": "b58e2bfda5cea347c9d58b7f11cf3012c7b3953f" },
@ -41,6 +45,8 @@
"nvim-treesitter": { "branch": "master", "commit": "b065b59196edb10a7c29bfbed88cc225b7e3de37" }, "nvim-treesitter": { "branch": "master", "commit": "b065b59196edb10a7c29bfbed88cc225b7e3de37" },
"nvim-treesitter-textobjects": { "branch": "master", "commit": "3e450cd85243da99dc23ebbf14f9c70e9a0c26a4" }, "nvim-treesitter-textobjects": { "branch": "master", "commit": "3e450cd85243da99dc23ebbf14f9c70e9a0c26a4" },
"nvim-ts-autotag": { "branch": "main", "commit": "e239a560f338be31337e7abc3ee42515daf23f5e" }, "nvim-ts-autotag": { "branch": "main", "commit": "e239a560f338be31337e7abc3ee42515daf23f5e" },
"nvim-web-devicons": { "branch": "master", "commit": "19d257cf889f79f4022163c3fbb5e08639077bd8" },
"oil.nvim": { "branch": "master", "commit": "52cc8a1fb35ea6ce1df536143add7ce7215c63c0" },
"omnisharp-extended-lsp.nvim": { "branch": "main", "commit": "aad7bf06b4ca0de816b919d475a75b30f5f62b61" }, "omnisharp-extended-lsp.nvim": { "branch": "main", "commit": "aad7bf06b4ca0de816b919d475a75b30f5f62b61" },
"overseer.nvim": { "branch": "master", "commit": "c416be50c2715a7f631d67e21154b8e6cd873ca3" }, "overseer.nvim": { "branch": "master", "commit": "c416be50c2715a7f631d67e21154b8e6cd873ca3" },
"persistence.nvim": { "branch": "main", "commit": "f6aad7dde7fcf54148ccfc5f622c6d5badd0cc3d" }, "persistence.nvim": { "branch": "main", "commit": "f6aad7dde7fcf54148ccfc5f622c6d5badd0cc3d" },
@ -58,5 +64,9 @@
"vim-dadbod": { "branch": "master", "commit": "fe5a55e92b2dded7c404006147ef97fb073d8b1b" }, "vim-dadbod": { "branch": "master", "commit": "fe5a55e92b2dded7c404006147ef97fb073d8b1b" },
"vim-dadbod-completion": { "branch": "master", "commit": "880f7e9f2959e567c718d52550f9fae1aa07aa81" }, "vim-dadbod-completion": { "branch": "master", "commit": "880f7e9f2959e567c718d52550f9fae1aa07aa81" },
"vim-dadbod-ui": { "branch": "master", "commit": "f29c85ab42861c6ef683289b0c6a51e0d436dcf6" }, "vim-dadbod-ui": { "branch": "master", "commit": "f29c85ab42861c6ef683289b0c6a51e0d436dcf6" },
"vim-flog": { "branch": "master", "commit": "afbbe41355122722a9e6beb23055e2b63187fc1e" },
"vim-fugitive": { "branch": "master", "commit": "d4877e54cef67f5af4f950935b1ade19ed6b7370" },
"vim-lastplace": { "branch": "master", "commit": "e58cb0df716d3c88605ae49db5c4741db8b48aa9" },
"vim-merginal": { "branch": "develop", "commit": "3dca10fd8bce10edbc2024651db4ffb6dd2d89de" },
"which-key.nvim": { "branch": "main", "commit": "8badb359f7ab8711e2575ef75dfe6fbbd87e4821" } "which-key.nvim": { "branch": "main", "commit": "8badb359f7ab8711e2575ef75dfe6fbbd87e4821" }
} }

View File

@ -20,6 +20,7 @@ require("lazy").setup({
{ "LazyVim/LazyVim", import = "lazyvim.plugins" }, { "LazyVim/LazyVim", import = "lazyvim.plugins" },
-- coding extras -- coding extras
{ import = "lazyvim.plugins.extras.coding.luasnip" }, { import = "lazyvim.plugins.extras.coding.luasnip" },
{ import = "lazyvim.plugins.extras.coding.mini-surround" },
-- editor extras -- editor extras
{ import = "lazyvim.plugins.extras.editor.overseer" }, { import = "lazyvim.plugins.extras.editor.overseer" },
-- formatting extras -- formatting extras

View File

@ -0,0 +1,42 @@
-- Disable the default highlight group
vim.g.conflict_marker_highlight_group = ""
-- Include text after begin and end markers
vim.g.conflict_marker_begin = "^<<<<<<< .*$"
vim.g.conflict_marker_end = "^>>>>>>> .*$"
-- Git conflict marker management plugin
return {
{
"rhysd/conflict-marker.vim",
config = function()
-- Highlight groups
vim.cmd("highlight ConflictMarkerBegin guibg=#2f7366")
vim.cmd("highlight ConflictMarkerOurs guibg=#2e5049")
vim.cmd("highlight ConflictMarkerTheirs guibg=#344f69")
vim.cmd("highlight ConflictMarkerEnd guibg=#2f628e")
vim.cmd("highlight ConflictMarkerCommonAncestorsHunk guibg=#754a81")
-- Read all lines in buffer, check if there is any conflict marker
function git_conflict_detection()
local lines = vim.api.nvim_buf_get_lines(0, 0, -1, false)
-- Check if strict regex is contained in any line
local beginning = vim.fn.match(lines, vim.g.conflict_marker_begin)
local ending = vim.fn.match(lines, vim.g.conflict_marker_end)
local enabled = vim.diagnostic.is_enabled()
local conflict = beginning > -1 or ending > -1
if conflict and enabled then
vim.diagnostic.enable(false)
elseif not conflict and not enabled then
vim.diagnostic.enable(true)
end
end
-- Autocommand to disable diagnostics on buffer enter
vim.api.nvim_create_autocmd({ "BufRead", "BufWritePre" }, {
group = vim.api.nvim_create_augroup("git-conflict-lsp-disable", { clear = true }),
callback = git_conflict_detection,
})
end,
},
}

3
lua/plugins/fidget.lua Normal file
View File

@ -0,0 +1,3 @@
return {
{ "j-hui/fidget.nvim", opts = {} },
}

23
lua/plugins/fugitive.lua Normal file
View File

@ -0,0 +1,23 @@
return {
{
-- Git related plugins
"tpope/vim-fugitive",
dependencies = {
{
"rbong/vim-flog",
lazy = true,
cmd = { "Flogsplit" },
},
"idanarye/vim-merginal",
},
keys = {
-- Switch in fugitive.vim status window with the current one
{ "<leader>gs", "<cmd>Gedit :<cr>", desc = "[G]it [S]tatus" },
{ "<leader>gF", "<cmd>Git fetch<cr>", desc = "[G]it [F]etch" },
{ "<leader>gP", "<cmd>Git push<cr>", desc = "[G]it [P]ush" },
{ "<leader>gp", "<cmd>Git pull<cr>", desc = "[G]it [P]ull" },
{ "<leader>gl", "<cmd>Flogsplit<cr><cmd>wincmd k<cr><cmd>q<cr>", desc = "[G]it [L]og" },
{ "<leader>gm", "<cmd>Merginal<cr>", desc = "[G]it [M]erginal" },
},
},
}

View File

@ -0,0 +1,6 @@
-- Plugin to intelligently reopen files at last edit position
return {
{
"farmergreg/vim-lastplace",
},
}

11
lua/plugins/lualine.lua Normal file
View File

@ -0,0 +1,11 @@
return {
{
"nvim-lualine/lualine.nvim",
opts = {
options = {
section_separators = { left = "", right = "" },
component_separators = { left = "", right = "" },
},
},
},
}

33
lua/plugins/oil.lua Normal file
View File

@ -0,0 +1,33 @@
return {
{
"stevearc/oil.nvim",
-- Optional dependencies
dependencies = { "nvim-tree/nvim-web-devicons" },
config = function()
-- Fix oil absolute path to relative path conversion
vim.api.nvim_create_augroup("OilRelPathFix", {})
vim.api.nvim_create_autocmd("BufLeave", {
group = "OilRelPathFix",
pattern = "oil:///*",
callback = function()
vim.cmd("cd .")
end,
})
local oil = require("oil")
oil.setup({
view_options = {
show_hidden = true,
},
})
vim.keymap.set("n", "<leader>fe", function()
if vim.bo.filetype == "oil" then
oil.close()
else
oil.open()
end
end, { desc = "[F]ile [E]xplorer" })
end,
},
}

56
lua/plugins/overseer.lua Normal file
View File

@ -0,0 +1,56 @@
-- Reference: overseer.nvim/lua/overseer/window.lua
local function is_open()
for _, winid in ipairs(vim.api.nvim_tabpage_list_wins(0)) do
local bufnr = vim.api.nvim_win_get_buf(winid)
if vim.bo[bufnr].filetype == "OverseerList" then
return true
end
end
return false
end
return {
{
"stevearc/overseer.nvim",
opts = {
task_list = {
bindings = {
["<C-h>"] = false,
["<C-j>"] = false,
["<C-k>"] = false,
["<C-l>"] = false,
["q"] = false,
},
},
},
keys = {
{ "<leader>ow", false },
{ "<leader>oo", false },
{
"<leader>ol",
function()
-- Get currently open windows (detects splits)
local curWindows = #vim.api.nvim_tabpage_list_wins(0)
-- Use builtin toggle if already using splits
if curWindows ~= (is_open() and 2 or 1) then
vim.cmd("OverseerToggle")
return
end
-- Otherwise, toggle overseer in fullscreen
overseer.toggle({ winid = 0 })
local bufnr = vim.api.nvim_get_current_buf()
if is_open() then
-- Maximize height
vim.cmd.winc("_")
elseif vim.bo[bufnr].filetype == "" and vim.bo.buftype ~= "terminal" then
-- Delete empty buffer created by overseer
vim.api.nvim_buf_delete(bufnr, {})
end
end,
desc = "[O]verseer [L]og",
},
{ "<leader>or", "<cmd>OverseerRun<cr>", desc = "[O]verseer [R]un" },
},
},
}