adds oil, blame, lazygit, and minimap
This commit is contained in:
parent
2ba39c6973
commit
6d8dc4e2de
6 changed files with 275 additions and 51 deletions
18
lua/custom/plugins/blame.lua
Normal file
18
lua/custom/plugins/blame.lua
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
return {
|
||||
{
|
||||
'FabijanZulj/blame.nvim',
|
||||
lazy = false,
|
||||
config = function()
|
||||
require('blame').setup()
|
||||
end,
|
||||
},
|
||||
-- keys = {
|
||||
-- {
|
||||
-- '<leader>mt',
|
||||
-- function()
|
||||
-- vim.keymap.set('n', '<leader>bt', ':BlameToggle<CR>')
|
||||
-- end,
|
||||
-- desc = 'Toggle git blame window',
|
||||
-- },
|
||||
-- },
|
||||
}
|
||||
5
lua/custom/plugins/dadbod.lua
Normal file
5
lua/custom/plugins/dadbod.lua
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
return {
|
||||
'tpope/vim-dadbod',
|
||||
'kristijanhusak/vim-dadbod-completion',
|
||||
'kristijanhusak/vim-dadbod-ui',
|
||||
}
|
||||
21
lua/custom/plugins/lazygit.lua
Normal file
21
lua/custom/plugins/lazygit.lua
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
-- nvim v0.8.0
|
||||
return {
|
||||
'kdheepak/lazygit.nvim',
|
||||
lazy = true,
|
||||
cmd = {
|
||||
'LazyGit',
|
||||
'LazyGitConfig',
|
||||
'LazyGitCurrentFile',
|
||||
'LazyGitFilter',
|
||||
'LazyGitFilterCurrentFile',
|
||||
},
|
||||
-- optional for floating window border decoration
|
||||
dependencies = {
|
||||
'nvim-lua/plenary.nvim',
|
||||
},
|
||||
-- setting the keybinding for LazyGit with 'keys' is recommended in
|
||||
-- order to load the plugin when the command is run for the first time
|
||||
keys = {
|
||||
{ '<leader>lg', '<cmd>LazyGit<cr>', desc = 'LazyGit' },
|
||||
},
|
||||
}
|
||||
77
lua/custom/plugins/minimap.lua
Normal file
77
lua/custom/plugins/minimap.lua
Normal file
|
|
@ -0,0 +1,77 @@
|
|||
return {
|
||||
'echasnovski/mini.map',
|
||||
version = '*',
|
||||
-- vim.keymap.set('n', '<leader>mo', MiniMap.open, { desc = 'Open MiniMap' }),
|
||||
config = function()
|
||||
-- require('mini.map').setup()
|
||||
local map = require 'mini.map'
|
||||
|
||||
local diagnostic_integration = map.gen_integration.diagnostic {
|
||||
error = 'DiagnosticFloatingError',
|
||||
warn = 'DiagnosticFloatingWarn',
|
||||
info = 'DiagnosticFloatingInfo',
|
||||
hint = 'DiagnosticFloatingHint',
|
||||
}
|
||||
|
||||
local builtin_search_integration = map.gen_integration.builtin_search()
|
||||
|
||||
local gitsigns_integration = map.gen_integration.gitsigns {
|
||||
add = 'GitSignsAdd',
|
||||
change = 'GitSignsChange',
|
||||
delete = 'GitSignsDelete',
|
||||
}
|
||||
|
||||
map.setup {
|
||||
integrations = {
|
||||
diagnostic_integration,
|
||||
builtin_search_integration,
|
||||
gitsigns_integration,
|
||||
},
|
||||
}
|
||||
end,
|
||||
|
||||
keys = {
|
||||
{
|
||||
'<leader>mt',
|
||||
function()
|
||||
require('mini.map').toggle()
|
||||
end,
|
||||
desc = 'Toggle minimap',
|
||||
},
|
||||
{
|
||||
'<leader>mc',
|
||||
function()
|
||||
require('mini.map').close()
|
||||
end,
|
||||
desc = 'Close minimap',
|
||||
},
|
||||
{
|
||||
'<leader>mf',
|
||||
function()
|
||||
require('mini.map').toggle_focus()
|
||||
end,
|
||||
desc = 'Toggle minimap focus',
|
||||
},
|
||||
{
|
||||
'<leader>mo',
|
||||
function()
|
||||
require('mini.map').open()
|
||||
end,
|
||||
desc = 'Open minimap',
|
||||
},
|
||||
{
|
||||
'<leader>mr',
|
||||
function()
|
||||
require('mini.map').refresh()
|
||||
end,
|
||||
desc = 'Refresh minimap',
|
||||
},
|
||||
{
|
||||
'<leader>ms',
|
||||
function()
|
||||
require('mini.map').toggle_side()
|
||||
end,
|
||||
desc = 'Toggle minimap side',
|
||||
},
|
||||
},
|
||||
}
|
||||
54
lua/custom/plugins/oil.lua
Normal file
54
lua/custom/plugins/oil.lua
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
return {
|
||||
'stevearc/oil.nvim',
|
||||
---@module 'oil'
|
||||
---@type oil.SetupOpts
|
||||
-- to open oil with - as shortcut
|
||||
vim.keymap.set('n', '-', '<CMD>Oil<CR>', { desc = 'Open parent directory' }),
|
||||
opts = {},
|
||||
-- Optional dependencies
|
||||
dependencies = { { 'echasnovski/mini.icons', opts = {} } },
|
||||
-- dependencies = { "nvim-tree/nvim-web-devicons" }, -- use if prefer nvim-web-devicons
|
||||
}
|
||||
|
||||
-- return {
|
||||
-- {
|
||||
-- 'stevearc/oil.nvim',
|
||||
-- vim.keymap.set('n', '-', '<CMD>Oil<CR>', { desc = 'Open parent directory' }),
|
||||
-- dependencies = { "nvim-tree/nvim-web-devicons" },
|
||||
-- config = function()
|
||||
-- CustomOilBar = function()
|
||||
-- local path = vim.fn.expand "%"
|
||||
-- path = path:gsub("oil://", "")
|
||||
--
|
||||
-- return " " .. vim.fn.fnamemodify(path, ":.")
|
||||
-- end
|
||||
--
|
||||
-- require("oil").setup {
|
||||
-- columns = { "icon" },
|
||||
-- keymaps = {
|
||||
-- ["<C-h>"] = false,
|
||||
-- ["<C-l>"] = false,
|
||||
-- ["<C-k>"] = false,
|
||||
-- ["<C-j>"] = false,
|
||||
-- ["<M-h>"] = "actions.select_split",
|
||||
-- },
|
||||
-- win_options = {
|
||||
-- winbar = "%{v:lua.CustomOilBar()}",
|
||||
-- },
|
||||
-- view_options = {
|
||||
-- show_hidden = true,
|
||||
-- is_always_hidden = function(name, _)
|
||||
-- local folder_skip = { "dev-tools.locks", "dune.lock", "_build" }
|
||||
-- return vim.tbl_contains(folder_skip, name)
|
||||
-- end,
|
||||
-- },
|
||||
-- }
|
||||
--
|
||||
-- -- Open parent directory in current window
|
||||
-- vim.keymap.set("n", "-", "<CMD>Oil<CR>", { desc = "Open parent directory" })
|
||||
--
|
||||
-- -- Open parent directory in floating window
|
||||
-- vim.keymap.set("n", "<space>-", require("oil").toggle_float)
|
||||
-- end,
|
||||
-- },
|
||||
-- }
|
||||
Loading…
Add table
Add a link
Reference in a new issue