Skip to content

Commit

Permalink
feat(keymaps): set keymaps for all plugins separately
Browse files Browse the repository at this point in the history
  • Loading branch information
tr1v3r committed Dec 19, 2024
1 parent 7f9bd23 commit 9b1c4f6
Show file tree
Hide file tree
Showing 5 changed files with 433 additions and 281 deletions.
2 changes: 2 additions & 0 deletions lua/plugins/editor.lua
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ editor["LunarVim/bigfile.nvim"] = {
editor["ojroques/nvim-bufdel"] = {
lazy = true,
cmd = { "BufDel", "BufDelAll", "BufDelOthers" },
keys = keymaps.bufdel(),
config = require("editor.nvim-bufdel"),
}
-- NOTE: `flash.nvim` is a powerful plugin that can be used as partial or complete replacements for:
Expand Down Expand Up @@ -88,6 +89,7 @@ editor["RRethy/vim-illuminate"] = {
editor["lambdalisue/suda.vim"] = {
lazy = true,
cmd = { "SudaRead", "SudaWrite" },
keys = keymaps.suda(),
config = require("editor.suda"),
}
editor["kevinhwang91/nvim-hlslens"] = {
Expand Down
2 changes: 2 additions & 0 deletions lua/plugins/lang.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
local lang = {}
local keymaps = require("r1v3r.keymaps")

lang["kevinhwang91/nvim-bqf"] = {
lazy = true,
Expand Down Expand Up @@ -30,6 +31,7 @@ lang["Saecki/crates.nvim"] = {
lang["iamcco/markdown-preview.nvim"] = {
lazy = true,
ft = "markdown",
keys = keymaps.markdown_preview(),
build = ":call mkdp#util#install()",
}
lang["chrisbra/csv.vim"] = {
Expand Down
25 changes: 21 additions & 4 deletions lua/plugins/tool.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
local tool = {}
local keymaps = require("r1v3r.keymaps")

tool["dstein64/vim-startuptime"] = {
-- lazy-load on a command
Expand All @@ -11,10 +12,12 @@ tool["dstein64/vim-startuptime"] = {
tool["nvim-tree/nvim-tree.lua"] = {
lazy = true,
cmd = { "NvimTreeToggle", "NvimTreeOpen", "NvimTreeFindFile", "NvimTreeFindFileToggle", "NvimTreeRefresh" },
keys = keymaps.nvim_tree(),
config = require("tool.nvim-tree"),
}
tool["tpope/vim-fugitive"] = {
lazy = true,
keys = keymaps.vim_fugitive(),
cmd = { "Git", "G" },
}
tool["gelguy/wilder.nvim"] = {
Expand All @@ -26,6 +29,7 @@ tool["gelguy/wilder.nvim"] = {
tool["kdheepak/lazygit.nvim"] = {
lazy = true,
cmd = "LazyGit",
keys = keymaps.lazygit(),
config = require("tool.lazygit"),
-- optional for floating window border decoration
dependencies = { "nvim-lua/plenary.nvim" },
Expand All @@ -41,17 +45,26 @@ tool["michaelb/sniprun"] = {
-- if you encountered error about no executable sniprun found.
build = "bash ./install.sh",
cmd = { "SnipRun", "SnipReset", "SnipInfo" },
keys = keymaps.sniprun(),
config = require("tool.sniprun"),
}
-- tool["akinsho/toggleterm.nvim"] = {
-- lazy = true,
-- cmd = {"ToggleTerm", "ToggleTermSetName", "ToggleTermToggleAll", "ToggleTermSendVisualLines",
-- "ToggleTermSendCurrentLine", "ToggleTermSendVisualSelection"},
-- config = require("tool.toggleterm")
-- lazy = true,
-- cmd = {
-- "ToggleTerm",
-- "ToggleTermSetName",
-- "ToggleTermToggleAll",
-- "ToggleTermSendVisualLines",
-- "ToggleTermSendCurrentLine",
-- "ToggleTermSendVisualSelection",
-- },
-- keys = keymaps.toggleterm(),
-- config = require("tool.toggleterm"),
-- }
tool["folke/trouble.nvim"] = {
lazy = true,
cmd = { "Trouble", "TroubleToggle", "TroubleRefresh" },
keys = keymaps.trouble(),
config = require("tool.trouble"),
}
tool["folke/which-key.nvim"] = {
Expand All @@ -62,6 +75,7 @@ tool["folke/which-key.nvim"] = {
tool["nvim-pack/nvim-spectre"] = {
lazy = true,
dependencies = { { "nvim-lua/plenary.nvim" } },
keys = keymaps.spectre(),
config = require("tool.spectre"),
}
-- general writing
Expand All @@ -81,6 +95,7 @@ tool["ron89/thesaurus_query.vim"] = {
tool["kevinhwang91/rnvimr"] = {
lazy = false,
-- cmd = { "RnvimrToggle" },
keys = keymaps.rnvimr(),
config = require("tool.ranger"),
}
-- kevinhwang91/rnvimr another plugin for ranger
Expand All @@ -92,6 +107,7 @@ tool["kevinhwang91/rnvimr"] = {
tool["nvim-telescope/telescope.nvim"] = {
lazy = true,
cmd = "Telescope",
keys = keymaps.telescope(),
config = require("tool.telescope"),
dependencies = {
{ "nvim-tree/nvim-web-devicons" },
Expand Down Expand Up @@ -125,6 +141,7 @@ tool["mfussenegger/nvim-dap"] = {
"DapStepOut",
"DapTerminate",
},
keys = keymaps.dap(),
config = require("tool.dap"),
dependencies = {
{
Expand Down
2 changes: 2 additions & 0 deletions lua/plugins/ui.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
local ui = {}
local keymaps = require("r1v3r.keymaps")

ui["goolord/alpha-nvim"] = {
lazy = true,
Expand Down Expand Up @@ -28,6 +29,7 @@ ui["akinsho/bufferline.nvim"] = {
version = "*",
event = { "BufReadPost", "BufAdd", "BufNewFile" },
dependencies = "nvim-tree/nvim-web-devicons",
keys = keymaps.bufferline(),
config = require("ui.bufferline"),
}
ui["Jint-lzxy/nvim"] = {
Expand Down
Loading

0 comments on commit 9b1c4f6

Please sign in to comment.