diff options
| author | Ariel D'Alessandro <dalessandro.ariel@gmail.com> | 2023-04-10 10:18:01 +0200 |
|---|---|---|
| committer | Ariel D'Alessandro <dalessandro.ariel@gmail.com> | 2023-04-10 10:18:01 +0200 |
| commit | 08d5556ab2f104cc2daff59c078c12816b8c9acc (patch) | |
| tree | 2e72e8d8e555d92195ae7e1d9f34c732f5be7886 /lua/plugins | |
| parent | 11fa125e9ed415021a2c5223e396c8f73fa05a13 (diff) | |
| download | nvim-conf-08d5556ab2f104cc2daff59c078c12816b8c9acc.tar.gz nvim-conf-08d5556ab2f104cc2daff59c078c12816b8c9acc.zip | |
feat(general): update keymaps
Diffstat (limited to 'lua/plugins')
| -rw-r--r-- | lua/plugins/color-picker.lua | 2 | ||||
| -rw-r--r-- | lua/plugins/comment.lua | 2 | ||||
| -rw-r--r-- | lua/plugins/dap.lua | 2 | ||||
| -rw-r--r-- | lua/plugins/database.lua | 2 | ||||
| -rw-r--r-- | lua/plugins/easy-align.lua | 2 | ||||
| -rw-r--r-- | lua/plugins/fugitive.lua | 8 | ||||
| -rw-r--r-- | lua/plugins/harpoon.lua | 13 | ||||
| -rw-r--r-- | lua/plugins/icon-picker.lua | 6 | ||||
| -rw-r--r-- | lua/plugins/laravel.lua | 4 | ||||
| -rw-r--r-- | lua/plugins/neogen.lua | 2 | ||||
| -rw-r--r-- | lua/plugins/overseer.lua | 2 | ||||
| -rw-r--r-- | lua/plugins/refactoring.lua | 1 | ||||
| -rw-r--r-- | lua/plugins/rest.lua | 18 | ||||
| -rw-r--r-- | lua/plugins/smart-splits.lua | 4 | ||||
| -rw-r--r-- | lua/plugins/smooth-cursor.lua | 2 | ||||
| -rw-r--r-- | lua/plugins/snippets.lua | 2 | ||||
| -rw-r--r-- | lua/plugins/spectre.lua | 2 | ||||
| -rw-r--r-- | lua/plugins/test.lua | 2 | ||||
| -rw-r--r-- | lua/plugins/todo-comments.lua | 2 | ||||
| -rw-r--r-- | lua/plugins/trouble.lua | 2 | ||||
| -rw-r--r-- | lua/plugins/worktree.lua | 2 |
21 files changed, 53 insertions, 29 deletions
diff --git a/lua/plugins/color-picker.lua b/lua/plugins/color-picker.lua index 482103f..1e6c88b 100644 --- a/lua/plugins/color-picker.lua +++ b/lua/plugins/color-picker.lua @@ -1,7 +1,7 @@ return { "ziontee113/color-picker.nvim", keys = { - {"<C-c>", "<cmd>PickColorInsert<cr>", mode = "i"}, + { "<C-c>", "<cmd>PickColorInsert<cr>", mode = "i", desc = "ColorPicker" }, }, config = true, } diff --git a/lua/plugins/comment.lua b/lua/plugins/comment.lua index 84de2ba..801223b 100644 --- a/lua/plugins/comment.lua +++ b/lua/plugins/comment.lua @@ -1,5 +1,5 @@ return { "numToStr/Comment.nvim", - keys = { { "gcc" }, { "gbc" }, { "gc", mode = "v" }, { "gb", mode = "v" } }, + keys = { { "gcc", desc = "Comment current line" }, { "gc", mode = "v", desc = "Comment selected text" } }, config = true, } diff --git a/lua/plugins/dap.lua b/lua/plugins/dap.lua index cdcdf85..a6582a6 100644 --- a/lua/plugins/dap.lua +++ b/lua/plugins/dap.lua @@ -9,7 +9,7 @@ return { "nvim-telescope/telescope-dap.nvim", "rcarriga/cmp-dap", }, - keys = { { "<leader>d" } }, + keys = { { "<leader>d", desc = "Open Debug menu" } }, config = function() require "alpha.dap" local ok_telescope, telescope = pcall(require, "telescope") diff --git a/lua/plugins/database.lua b/lua/plugins/database.lua index c6ed7ea..5c0bddf 100644 --- a/lua/plugins/database.lua +++ b/lua/plugins/database.lua @@ -5,7 +5,7 @@ return { "kristijanhusak/vim-dadbod-completion", "tpope/vim-dotenv", }, - keys = { { "<leader><leader>db", ":tab DBUI<cr>" } }, + keys = { { "<leader><leader>db", ":tab DBUI<cr>", desc = "Open Database client" } }, init = function() require "alpha.database" end, diff --git a/lua/plugins/easy-align.lua b/lua/plugins/easy-align.lua index 6e14908..7d33478 100644 --- a/lua/plugins/easy-align.lua +++ b/lua/plugins/easy-align.lua @@ -1,4 +1,4 @@ return { "junegunn/vim-easy-align", - keys = { { "ga", "<Plug>(EasyAlign)", mode = { "n", "v" } } }, + keys = { { "ga", "<Plug>(EasyAlign)", mode = { "n", "v" }, desc = "EasyAlign" } }, } diff --git a/lua/plugins/fugitive.lua b/lua/plugins/fugitive.lua index 10df419..4698d40 100644 --- a/lua/plugins/fugitive.lua +++ b/lua/plugins/fugitive.lua @@ -1,10 +1,10 @@ return { "tpope/vim-fugitive", keys = { - { "<leader>ga", ":Git fetch --all -p<cr>" }, - { "<leader>gl", ":Git pull<cr>" }, - { "<leader>gdh", ":diffget //2<cr>" }, - { "<leader>gdl", ":diffget //3<cr>" }, + { "<leader>ga", ":Git fetch --all -p<cr>", desc = "Git fetch" }, + { "<leader>gl", ":Git pull<cr>", desc = "Git pull" }, + { "<leader>gdh", ":diffget //2<cr>", desc = "Git diff grab from left" }, + { "<leader>gdl", ":diffget //3<cr>", desc = "Git diff grab from right" }, }, cmd = { "G", "Git" }, } diff --git a/lua/plugins/harpoon.lua b/lua/plugins/harpoon.lua index 06ec2aa..a214924 100644 --- a/lua/plugins/harpoon.lua +++ b/lua/plugins/harpoon.lua @@ -7,6 +7,7 @@ table.insert(keys, { function() require("harpoon.ui").toggle_quick_menu() end, + desc = "Harpoon Menu", }) table.insert(keys, { @@ -14,15 +15,17 @@ table.insert(keys, { function() require("harpoon.mark").add_file() end, + desc = "Harpoon Add file", }) table.insert(keys, { "<leader>st", - function () - vim.api.nvim_command([[vsplit]]) + function() + vim.api.nvim_command [[vsplit]] require("harpoon.term").gotoTerminal(1) - vim.api.nvim_command([[startinsert]]) - end + vim.api.nvim_command [[startinsert]] + end, + desc = "Harpoon quick split Terminal", }) for i = 1, terms do @@ -31,6 +34,7 @@ for i = 1, terms do function() require("harpoon.term").gotoTerminal(i) end, + desc = "Harpoon go to terminal " .. i, }) end @@ -40,6 +44,7 @@ for i = 1, binds do function() require("harpoon.ui").nav_file(i) end, + desc = "Harpoon go to file " .. i, }) end diff --git a/lua/plugins/icon-picker.lua b/lua/plugins/icon-picker.lua index e9f1e94..a466b6a 100644 --- a/lua/plugins/icon-picker.lua +++ b/lua/plugins/icon-picker.lua @@ -1,9 +1,9 @@ return { "ziontee113/icon-picker.nvim", keys = { - { "<Leader><Leader>i", "<cmd>IconPickerNormal nerd_font<cr>", mode = "n" }, - { "<Leader><Leader>y", "<cmd>IconPickerYank nerd_font<cr>", mode = "n" }, - { "<C-o>", "<cmd>IconPickerInsert nerd_font<cr>", mode = "i" }, + { "<Leader><Leader>i", "<cmd>IconPickerNormal nerd_font<cr>", mode = "n", desc = "IconPicker NerdFont Insert" }, + { "<Leader><Leader>y", "<cmd>IconPickerYank nerd_font<cr>", mode = "n", desc = "IconPicker NerdFont Yank" }, + { "<C-o>", "<cmd>IconPickerInsert nerd_font<cr>", mode = "i", desc = "IconPicker NerdFont Insert mode" }, }, opts = { disable_legacy_commands = true }, } diff --git a/lua/plugins/laravel.lua b/lua/plugins/laravel.lua index b236e54..b87b12b 100644 --- a/lua/plugins/laravel.lua +++ b/lua/plugins/laravel.lua @@ -6,8 +6,8 @@ return { }, cmd = { "Sail", "Artisan", "Composer", "Npm", "Laravel" }, keys = { - { "<leader>la", ":Laravel artisan<cr>" }, - { "<leader>lr", ":Laravel routes<cr>" }, + { "<leader>la", ":Laravel artisan<cr>", desc = "Laravel Application Commands" }, + { "<leader>lr", ":Laravel routes<cr>", desc = "Laravel Application Routes" }, }, config = function() vim.g.laravel_log_level = "debug" diff --git a/lua/plugins/neogen.lua b/lua/plugins/neogen.lua index 9fd3c36..6b234ae 100644 --- a/lua/plugins/neogen.lua +++ b/lua/plugins/neogen.lua @@ -2,6 +2,6 @@ return { "danymat/neogen", dependencies = "nvim-treesitter/nvim-treesitter", cmd = { "Neogen" }, - keys = {{"<leader>n", ":Neogen<cr>"}}, + keys = { { "<leader>n", ":Neogen<cr>", desc = "Add comment to the near possible object" } }, opts = { snippet_engine = "luasnip" }, } diff --git a/lua/plugins/overseer.lua b/lua/plugins/overseer.lua index ab773ac..634de8b 100644 --- a/lua/plugins/overseer.lua +++ b/lua/plugins/overseer.lua @@ -1,5 +1,5 @@ return { "stevearc/overseer.nvim", - enabled = false, + enabled = false, config = true, } diff --git a/lua/plugins/refactoring.lua b/lua/plugins/refactoring.lua index 6c48610..92cdf64 100644 --- a/lua/plugins/refactoring.lua +++ b/lua/plugins/refactoring.lua @@ -11,6 +11,7 @@ return { require("telescope").extensions.refactoring.refactors() end, mode = { "n", "v" }, + desc = "Refactoring menu", }, }, config = function() diff --git a/lua/plugins/rest.lua b/lua/plugins/rest.lua index 2391d02..2eca102 100644 --- a/lua/plugins/rest.lua +++ b/lua/plugins/rest.lua @@ -32,11 +32,21 @@ return { pattern = "http", callback = function() local buff = tonumber(vim.fn.expand "<abuf>", 10) - vim.keymap.set("n", "<leader>rn", rest_nvim.run, { noremap = true, buffer = buff }) - vim.keymap.set("n", "<leader>rl", rest_nvim.last, { noremap = true, buffer = buff }) - vim.keymap.set("n", "<leader>rp", function() + vim.keymap.set( + "n", + "<leader>hn", + rest_nvim.run, + { noremap = true, buffer = buff, desc = "Run near http request" } + ) + vim.keymap.set( + "n", + "<leader>hl", + rest_nvim.last, + { noremap = true, buffer = buff, desc = "Run last http resquest" } + ) + vim.keymap.set("n", "<leader>hp", function() rest_nvim.run(true) - end, { noremap = true, buffer = buff }) + end, { noremap = true, buffer = buff, desc = "Preview http curl" }) end, }) end, diff --git a/lua/plugins/smart-splits.lua b/lua/plugins/smart-splits.lua index 49e1df3..57faedb 100644 --- a/lua/plugins/smart-splits.lua +++ b/lua/plugins/smart-splits.lua @@ -7,24 +7,28 @@ return { function() require("smart-splits").resize_left() end, + desc = "Resize window left +10", }, { "<A-j>", function() require("smart-splits").resize_down() end, + desc = "Resize window down +10", }, { "<A-k>", function() require("smart-splits").resize_up() end, + desc = "Resize window up +10", }, { "<A-l>", function() require("smart-splits").resize_right() end, + desc = "Resize window right +10", }, }, } diff --git a/lua/plugins/smooth-cursor.lua b/lua/plugins/smooth-cursor.lua index d855e1c..58efc73 100644 --- a/lua/plugins/smooth-cursor.lua +++ b/lua/plugins/smooth-cursor.lua @@ -1,7 +1,7 @@ return { "gen740/SmoothCursor.nvim", config = function() - require("smoothcursor").setup({cursor = ""}) + require("smoothcursor").setup { cursor = "" } vim.api.nvim_set_hl(0, "SmoothCursor", { fg = "#8a9baa" }) diff --git a/lua/plugins/snippets.lua b/lua/plugins/snippets.lua index 9ed2edf..48c93b8 100644 --- a/lua/plugins/snippets.lua +++ b/lua/plugins/snippets.lua @@ -133,6 +133,6 @@ return { event = "VeryLazy", config = function() config() - vim.keymap.set("n", "<leader><leader>s", config) + vim.keymap.set("n", "<leader><leader>s", config, { desc = "Reload snippets" }) end, } diff --git a/lua/plugins/spectre.lua b/lua/plugins/spectre.lua index e11a328..7510c7a 100644 --- a/lua/plugins/spectre.lua +++ b/lua/plugins/spectre.lua @@ -1,5 +1,5 @@ return { "nvim-pack/nvim-spectre", - keys = {{"<leader>F", ":Spectre<cr>"}}, + keys = { { "<leader>F", ":Spectre<cr>", desc = "Spectre Search open" } }, config = true, } diff --git a/lua/plugins/test.lua b/lua/plugins/test.lua index e203679..aa9cba7 100644 --- a/lua/plugins/test.lua +++ b/lua/plugins/test.lua @@ -1,6 +1,6 @@ return { "vim-test/vim-test", - keys = { { "<leader>t" } }, + keys = { { "<leader>t", desc = "Open Test menu" } }, dependencies = { "anuvyklack/hydra.nvim", }, diff --git a/lua/plugins/todo-comments.lua b/lua/plugins/todo-comments.lua index 2e53f49..fef635e 100644 --- a/lua/plugins/todo-comments.lua +++ b/lua/plugins/todo-comments.lua @@ -12,12 +12,14 @@ return { function() require("todo-comments").jump_next() end, + desc = "Jump to next TODO", }, { "[t", function() require("todo-comments").jump_prev() end, + desc = "Jump to prev TODO", }, }, } diff --git a/lua/plugins/trouble.lua b/lua/plugins/trouble.lua index 5d53edb..81dcff9 100644 --- a/lua/plugins/trouble.lua +++ b/lua/plugins/trouble.lua @@ -1,6 +1,6 @@ return { "folke/trouble.nvim", dependencies = "kyazdani42/nvim-web-devicons", - keys = { { "<leader><leader>t", "<cmd>TroubleToggle<cr>" } }, + keys = { { "<leader><leader>t", "<cmd>TroubleToggle<cr>", desc = "Trouble toggle" } }, config = true, } diff --git a/lua/plugins/worktree.lua b/lua/plugins/worktree.lua index c3bfd8d..9e74a9c 100644 --- a/lua/plugins/worktree.lua +++ b/lua/plugins/worktree.lua @@ -6,12 +6,14 @@ return { function() require("telescope").extensions.git_worktree.git_worktrees() end, + desc = "Git Worktree switch", }, { "<leader>gn", function() require("telescope").extensions.git_worktree.create_git_worktree() end, + desc = "Git Worktree new branch", }, }, config = function() |