Move plugins around

This commit is contained in:
Andrew Tomaka 2025-01-01 10:58:59 -05:00
parent d060ef3a52
commit e1f200451b
Signed by: atomaka
GPG key ID: 61209BF70A5B18BE
10 changed files with 126 additions and 129 deletions

View file

@ -1,121 +0,0 @@
-- PLUGIN CONFIGURATION
--- bufdelete.nvim
vim.keymap.set("n", "<Leader>bd", function()
require("bufdelete").bufdelete(0, true)
end)
--- gitblame.nvim
vim.g.gitblame_use_blame_commit_file_urls = true
vim.g.gitblame_display_virtual_text = 0
require('gitblame').setup {enabled = true}
vim.api.nvim_set_keymap('n', '<leader>gbo', ':GitBlameOpenCommitURL<CR>', {
noremap = true,
silent = true,
})
--- gitlinker.nvim
require"gitlinker".setup({
router = {
browse = {
["^git%.atomaka%.com"] = "https://git.atomaka.com/"
.. "{_A.ORG}/"
.. "{_A.REPO}/commit/"
.. "{_A.REV}/"
},
blame = {
["^git%.atomaka%.com"] = "https://git.atomaka.com/"
.. "{_A.ORG}/"
.. "{_A.REPO}/blame/"
.. "branch/{_A.CURRENT_BRANCH}/"
.. "{_A.FILE}"
},
},
})
vim.keymap.set(
{"n", 'v'},
"<leader>gl",
function()
require("gitlinker").link({ action = require("gitlinker.actions").system })
end,
{ silent = true, noremap = true, desc = "GitLink!" }
)
vim.keymap.set(
{"n", 'v'},
"<leader>glb",
function()
require("gitlinker").link({
router_type = "blame",
action = require("gitlinker.actions").system,
})
end,
{ silent = true, noremap = true, desc = "GitLink! blame" }
)
--- gitsigns.nvim
require("gitsigns").setup()
vim.keymap.set("n", "<leader>gb", require("gitsigns").toggle_current_line_blame)
--- git-messanger.vim
vim.g["git_messenger_always_into_popup"] = 1
--- nvim-surround
require("nvim-surround").setup()
--- telescope.nvim
vim.api.nvim_set_keymap('n', '<leader>t', ':Telescope<CR>', {
noremap = true,
silent = true,
})
vim.keymap.set("n", "<C-p>", function()
require("telescope.builtin").find_files({
file_ignore_patterns = {".git/", "node_modules/"},
hidden = true,
previewer = false,
})
end)
vim.keymap.set('n', '<Leader>ff', function()
require("telescope.builtin").find_files({
file_ignore_patterns = {".git/", "node_modules/"},
hidden = true,
no_ignore = true,
previewer = false,
})
end)
vim.keymap.set('n', '<Leader>fg', function()
require("telescope.builtin").live_grep({
file_ignore_patterns = {".git/", "node_modules/"},
hidden = true,
previewer = false,
})
end)
vim.keymap.set('n', '<Leader>fb', function()
require("telescope.builtin").buffers()
end)
--- whitespace.nvim
require("whitespace-nvim").setup({
hightlight = "red"
})
vim.keymap.set("n", "<Leader>fw", function()
require("whitespace-nvim").trim()
end, { silent = true })
--- vim-zoom
-- let g:zoom#statustext='Z'
vim.api.nvim_tabpage_set_var(0, "zoomed", 0)
vim.keymap.set("n", "<C-w>", function()
local char = vim.fn.nr2char(vim.fn.getchar())
if vim.api.nvim_tabpage_get_var(0, "zoomed")== 1 then
if char == 'v' or char == 's' or char == '' or char == '' then
vim.notify("cannot split when zoomed", vim.log.levels.ERROR)
return ""
end
end
return "<C-w>"..char
end, {expr = true, replace_keycodes = true})
vim.keymap.set("n", "<C-w>z", "<Plug>(zoom-toggle)")
vim.keymap.set("n", "<C-w><C-z>", "<Plug>(zoom-toggle)")

View file

@ -0,0 +1,6 @@
return {
"famiu/bufdelete.nvim",
keys = {
{ "<Leader>bd", function() require("bufdelete").bufdelete(0, true) end }
},
}

View file

@ -0,0 +1,12 @@
return {
"f-person/git-blame.nvim",
event = "VeryLazy",
keys = {
{ "<leader>gbo", "<cmd>GitBlameOpenCommitURL<CR>", desc = "Open Commit" }
},
opts = {
enabled = true,
use_blame_commit_file_urls = true,
display_virtual_text = false
},
}

View file

@ -0,0 +1,5 @@
vim.g["git_messenger_always_into_popup"] = 1
return {
"rhysd/git-messenger.vim"
}

View file

@ -0,0 +1,27 @@
return {
{
"linrongbin16/gitlinker.nvim",
cmd = "GitLink",
opts = {
router = {
browse = {
["^git%.atomaka%.com"] = "https://git.atomaka.com/"
.. "{_A.ORG}/"
.. "{_A.REPO}/commit/"
.. "{_A.REV}/"
},
blame = {
["^git%.atomaka%.com"] = "https://git.atomaka.com/"
.. "{_A.ORG}/"
.. "{_A.REPO}/blame/"
.. "branch/{_A.CURRENT_BRANCH}/"
.. "{_A.FILE}"
},
},
},
keys = {
{ "<leader>gl", "<cmd>GitLink!<cr>", mode = { "n", "v" }, desc = "Gitlink!" },
{ "<leader>glb", "<cmd>GitLink! blame<cr>", mode = { "n", "v" }, desc = "Gitlink! blame" },
},
},
}

View file

@ -0,0 +1,11 @@
return {
"lewis6991/gitsigns.nvim",
keys = {
{
"<leader>gb",
function() require("gitsigns").toggle_current_line_blame() end,
desc = "Toggle line blame"
}
},
config = function() require("gitsigns").setup({}) end,
}

View file

@ -1,16 +1,9 @@
return {
"nvim-lua/plenary.nvim",
"nvim-telescope/telescope.nvim",
"famiu/bufdelete.nvim",
"dhruvasagar/vim-zoom",
"gpanders/editorconfig.nvim",
"johnfrankmorgan/whitespace.nvim",
"johnfrankmorgan/whitespace.nvim", -- not working
"kylechui/nvim-surround",
-- "FabijanZulj/blame.nvim",
"rhysd/git-messenger.vim",
"lewis6991/gitsigns.nvim",
"linrongbin16/gitlinker.nvim",
"f-person/git-blame.nvim",
"tpope/vim-eunuch",
"gruvbox-community/gruvbox",

View file

@ -0,0 +1,7 @@
return {
"kylechui/nvim-surround",
event = "VeryLazy",
config = function()
require("nvim-surround").setup({})
end
}

View file

@ -0,0 +1,36 @@
local builtin = require('telescope.builtin')
vim.api.nvim_set_keymap('n', '<leader>t', ':Telescope<CR>', {
noremap = true,
silent = true,
})
vim.keymap.set("n", "<C-p>", function()
builtin.find_files({
file_ignore_patterns = {".git/", "node_modules/"},
hidden = true,
previewer = false,
})
end)
vim.keymap.set('n', '<Leader>ff', function()
builtin.find_files({
file_ignore_patterns = {".git/", "node_modules/"},
hidden = true,
no_ignore = true,
previewer = false,
})
end)
vim.keymap.set('n', '<Leader>fg', function()
builtin.live_grep({
file_ignore_patterns = {".git/", "node_modules/"},
hidden = true,
previewer = false,
})
end)
vim.keymap.set('n', '<Leader>fb', function()
builtin.buffers()
end)
return {
'nvim-telescope/telescope.nvim',
dependencies = { 'nvim-lua/plenary.nvim' }
}

View file

@ -0,0 +1,21 @@
vim.api.nvim_tabpage_set_var(0, "zoomed", 0)
vim.keymap.set("n", "<C-w>", function()
local char = vim.fn.nr2char(vim.fn.getchar())
if vim.api.nvim_tabpage_get_var(0, "zoomed")== 1 then
if char == 'v' or char == 's' or char == '' or char == '' then
vim.notify("cannot split when zoomed", vim.log.levels.ERROR)
return ""
end
end
return "<C-w>"..char
end, {expr = true, replace_keycodes = true})
return {
"dhruvasagar/vim-zoom",
keys = {
{ "<C-w>z", "<Plug>(zoom-toggle)" },
{ "<C-w><C-z>", "<Plug>(zoom-toggle)" },
}
}