From 83b3ce29f5e1820bd1aafee833b1af9b057fc87e Mon Sep 17 00:00:00 2001 From: rootiest Date: Fri, 12 Jul 2024 18:55:02 -0400 Subject: [PATCH] =?UTF-8?q?=F0=9F=91=81=EF=B8=8F=F0=9F=97=A8=EF=B8=8F=20Wh?= =?UTF-8?q?ich-key=20Update?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Implement the new which-key spec - Particularly: ICONS! --- lua/config/keybinds.lua | 119 +++++++++++++-------------------- lua/plugins/codesnap.lua | 8 +-- lua/plugins/gx.lua | 8 ++- lua/plugins/icon-picker.lua | 6 +- lua/plugins/lazygit.lua | 5 +- lua/plugins/rip-substitute.lua | 2 +- 6 files changed, 62 insertions(+), 86 deletions(-) diff --git a/lua/config/keybinds.lua b/lua/config/keybinds.lua index fada950..3323b57 100644 --- a/lua/config/keybinds.lua +++ b/lua/config/keybinds.lua @@ -18,78 +18,53 @@ end, { force = true }) -- ------------------------------- Leader Maps --------------------------------- local wk = require("which-key") +local opts = { noremap = true, silent = true } wk.add({ - { "g", group = " Git" }, - { "gS", "LazyGit", desc = " LazyGit" }, - { "gn", group = " Gists" }, - { "gnc", "GistCreate", desc = " Create Gist" }, - { "gnf", "GistList", desc = "󰮗 Find Gists" }, - { "l", group = "󰒲 Lazy" }, - { "lv", "Lazy", desc = "󰒲 LazyVim" }, - { "lx", "LazyExtras", desc = " LazyExtras" }, + { + "gS", + "LazyGit", + desc = "LazyGit", + }, + { + "gn", + group = "Gists", + icon = { icon = "", color = "orange" }, + }, + { + "gnc", + "GistCreate", + desc = "Create Gist", + }, + { + "gnf", + "GistList", + desc = "Find Gists", + }, + { + "l", + group = "Lazy", + }, + { + "lv", + "Lazy", + desc = "LazyVim", + }, + { + "lx", + "LazyExtras", + desc = "LazyExtras", + }, + { + "m", + group = "MiniMap", + icon = { icon = "", color = "yellow" }, + }, + { + "I", + group = "IconPicker", + icon = { icon = "󰥸", color = "orange" }, + }, }) --- ------------------------------ Abbreviations -------------------------------- -vim.keymap.set("ia", "teh", "the") -vim.keymap.set("ia", "accomodate", "accommodate") -vim.keymap.set("ia", "acommodate", "accommodate") -vim.keymap.set("ia", "aparent", "apparent") -vim.keymap.set("ia", "aparrent", "apparent") -vim.keymap.set("ia", "apparant", "apparent") -vim.keymap.set("ia", "apparrent", "apparent") -vim.keymap.set("ia", "aquire", "acquire") -vim.keymap.set("ia", "becuase", "because") -vim.keymap.set("ia", "cauhgt", "caught") -vim.keymap.set("ia", "choosen", "chosen") -vim.keymap.set("ia", "cieling", "ceiling") -vim.keymap.set("ia", "collegue", "teammate") -vim.keymap.set("ia", "concensus", "consensus") -vim.keymap.set("ia", "contians", "contains") -vim.keymap.set("ia", "cosnt", "const") -vim.keymap.set("ia", "dervied", "derived") -vim.keymap.set("ia", "fales", "false") -vim.keymap.set("ia", "fasle", "false") -vim.keymap.set("ia", "fitler", "filter") -vim.keymap.set("ia", "flase", "false") -vim.keymap.set("ia", "foward", "forward") -vim.keymap.set("ia", "frequecy", "frequency") -vim.keymap.set("ia", "gaurantee", "guarantee") -vim.keymap.set("ia", "guaratee", "guarantee") -vim.keymap.set("ia", "heigth", "height") -vim.keymap.set("ia", "heirarchy", "hierarchy") -vim.keymap.set("ia", "inclued", "include") -vim.keymap.set("ia", "interator", "iterator") -vim.keymap.set("ia", "intput", "input") -vim.keymap.set("ia", "invliad", "invalid") -vim.keymap.set("ia", "lenght", "length") -vim.keymap.set("ia", "liasion", "liaison") -vim.keymap.set("ia", "libary", "library") -vim.keymap.set("ia", "listner", "listener") -vim.keymap.set("ia", "looses:", "loses") -vim.keymap.set("ia", "looup", "lookup") -vim.keymap.set("ia", "manefist", "manifest") -vim.keymap.set("ia", "namesapce", "namespace") -vim.keymap.set("ia", "namespcae", "namespace") -vim.keymap.set("ia", "occassion", "occasion") -vim.keymap.set("ia", "occured", "occurred") -vim.keymap.set("ia", "ouptut", "output") -vim.keymap.set("ia", "ouput", "output") -vim.keymap.set("ia", "overide", "override") -vim.keymap.set("ia", "postion", "position") -vim.keymap.set("ia", "priviledge", "privilege") -vim.keymap.set("ia", "psuedo", "pseudo") -vim.keymap.set("ia", "recieve", "receive") -vim.keymap.set("ia", "refered", "referred") -vim.keymap.set("ia", "relevent", "relevant") -vim.keymap.set("ia", "retreive", "retrieve") -vim.keymap.set("ia", "sloder", "solder") -vim.keymap.set("ia", "sheild", "shield") -vim.keymap.set("ia", "garbarge", "garbage") -vim.keymap.set("ia", "oposite", "opposite") -vim.keymap.set("ia", "oportunity", "opportunity") -vim.keymap.set("ia", "retreive", "retrieve") -vim.keymap.set("ia", "vegitarien", "vegetarian") -vim.keymap.set("ia", "vegatarian", "vegetarian") -vim.keymap.set("ia", "vegeterian", "vegetarian") -vim.keymap.set("ia", "vegatarien", "vegetarian") -vim.keymap.set("ia", "vegeterien", "vegetarian") +-- ---------------------------- Spell Correction ------------------------------- +require("config/spellcheck") diff --git a/lua/plugins/codesnap.lua b/lua/plugins/codesnap.lua index 0e4c0ac..1bad3de 100644 --- a/lua/plugins/codesnap.lua +++ b/lua/plugins/codesnap.lua @@ -9,25 +9,25 @@ return { "cy", "CodeSnap", mode = "x", - desc = "󰹑 Save selected code snapshot into clipboard", + desc = "Save selected code snapshot into clipboard", }, { "cs", "CodeSnapSave", mode = "x", - desc = "󰉏 Save selected code snapshot in ~/Pictures", + desc = "Save selected code snapshot in ~/Pictures", }, { "ch", "CodeSnapHighlight", mode = "x", - desc = " Highlight and snapshot selected code into clipboard", + desc = "Highlight and snapshot selected code into clipboard", }, { "ci", "CodeSnapASCII", mode = "x", - desc = " Save ASCII code snapshot into clipboard", + desc = "Save ASCII code snapshot into clipboard", }, }, opts = { diff --git a/lua/plugins/gx.lua b/lua/plugins/gx.lua index d4b57f6..ce5d3b0 100644 --- a/lua/plugins/gx.lua +++ b/lua/plugins/gx.lua @@ -4,7 +4,13 @@ return { "chrishrb/gx.nvim", - keys = { { "gx", "Browse", mode = { "n", "x" } } }, + keys = { + { + "gx", + "Browse", + mode = { "n", "x" }, + } + }, cmd = { "Browse" }, init = function() vim.g.netrw_nogx = 1 -- disable netrw gx diff --git a/lua/plugins/icon-picker.lua b/lua/plugins/icon-picker.lua index 7c9232b..5806b1a 100644 --- a/lua/plugins/icon-picker.lua +++ b/lua/plugins/icon-picker.lua @@ -6,11 +6,9 @@ return { "ziontee113/icon-picker.nvim", config = function() require("icon-picker").setup({ disable_legacy_commands = true }) - local opts = { noremap = true, silent = true } - - vim.keymap.set("n", "i", "IconPickerNormal", opts) - vim.keymap.set("n", "y", "IconPickerYank", opts) --> Yank the selected icon into register + vim.keymap.set("n", "Ii", "Pick Icon", opts) + vim.keymap.set("n", "Iy", "Yank Icon", opts) vim.keymap.set("i", "", "IconPickerInsert", opts) end, } diff --git a/lua/plugins/lazygit.lua b/lua/plugins/lazygit.lua index 49aee0a..3637ac3 100644 --- a/lua/plugins/lazygit.lua +++ b/lua/plugins/lazygit.lua @@ -11,13 +11,10 @@ return { "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 = { - { "lg", "LazyGit", desc = " LazyGit" }, + { "lg", "LazyGit", desc = "LazyGit" }, }, } diff --git a/lua/plugins/rip-substitute.lua b/lua/plugins/rip-substitute.lua index 46d52c5..957b848 100644 --- a/lua/plugins/rip-substitute.lua +++ b/lua/plugins/rip-substitute.lua @@ -12,7 +12,7 @@ return { require("rip-substitute").sub() end, mode = { "n", "x" }, - desc = " rip substitute", + desc = "Rip Substitute", }, }, }