remove icons from mapping descriptions

they look good on whichkey but its too much work to find icons for each mapping description and not all nerdfont icons align the same, some need extra spaces etc so i removed them
This commit is contained in:
siduck 2022-08-09 06:49:38 +05:30
parent 65cb9ba5fc
commit 01b17d2ad6

View file

@ -9,43 +9,43 @@ local M = {}
M.general = { M.general = {
i = { i = {
-- go to beginning and end -- go to beginning and end
["<C-b>"] = { "<ESC>^i", "beginning of line" }, ["<C-b>"] = { "<ESC>^i", "beginning of line" },
["<C-e>"] = { "<End>", "end of line" }, ["<C-e>"] = { "<End>", "end of line" },
-- navigate within insert mode -- navigate within insert mode
["<C-h>"] = { "<Left>", "move left" }, ["<C-h>"] = { "<Left>", "move left" },
["<C-l>"] = { "<Right>", "move right" }, ["<C-l>"] = { "<Right>", "move right" },
["<C-j>"] = { "<Down>", "move down" }, ["<C-j>"] = { "<Down>", "move down" },
["<C-k>"] = { "<Up>", "move up" }, ["<C-k>"] = { "<Up>", "move up" },
}, },
n = { n = {
["<ESC>"] = { "<cmd> noh <CR>", "no highlight" }, ["<ESC>"] = { "<cmd> noh <CR>", "no highlight" },
-- switch between windows -- switch between windows
["<C-h>"] = { "<C-w>h", "window left" }, ["<C-h>"] = { "<C-w>h", "window left" },
["<C-l>"] = { "<C-w>l", "window right" }, ["<C-l>"] = { "<C-w>l", "window right" },
["<C-j>"] = { "<C-w>j", "window down" }, ["<C-j>"] = { "<C-w>j", "window down" },
["<C-k>"] = { "<C-w>k", "window up" }, ["<C-k>"] = { "<C-w>k", "window up" },
-- save -- save
["<C-s>"] = { "<cmd> w <CR>", "save file" }, ["<C-s>"] = { "<cmd> w <CR>", "save file" },
-- Copy all -- Copy all
["<C-c>"] = { "<cmd> %y+ <CR>", "copy whole file" }, ["<C-c>"] = { "<cmd> %y+ <CR>", "copy whole file" },
-- line numbers -- line numbers
["<leader>n"] = { "<cmd> set nu! <CR>", "toggle line number" }, ["<leader>n"] = { "<cmd> set nu! <CR>", "toggle line number" },
["<leader>rn"] = { "<cmd> set rnu! <CR>", "toggle relative number" }, ["<leader>rn"] = { "<cmd> set rnu! <CR>", "toggle relative number" },
-- update nvchad -- update nvchad
["<leader>uu"] = { "<cmd> :NvChadUpdate <CR>", "update nvchad" }, ["<leader>uu"] = { "<cmd> :NvChadUpdate <CR>", "update nvchad" },
["<leader>tt"] = { ["<leader>tt"] = {
function() function()
require("base46").toggle_theme() require("base46").toggle_theme()
end, end,
"toggle theme", "toggle theme",
}, },
-- Allow moving the cursor through wrapped lines with j, k, <Up> and <Down> -- Allow moving the cursor through wrapped lines with j, k, <Up> and <Down>
@ -58,18 +58,18 @@ M.general = {
["<Down>"] = { 'v:count || mode(1)[0:1] == "no" ? "j" : "gj"', opts = { expr = true } }, ["<Down>"] = { 'v:count || mode(1)[0:1] == "no" ? "j" : "gj"', opts = { expr = true } },
-- new buffer -- new buffer
["<S-b>"] = { "<cmd> enew <CR>", "new buffer" }, ["<S-b>"] = { "<cmd> enew <CR>", "new buffer" },
-- close buffer + hide terminal buffer -- close buffer + hide terminal buffer
["<leader>x"] = { ["<leader>x"] = {
function() function()
require("core.utils").close_buffer() require("core.utils").close_buffer()
end, end,
"close buffer", "close buffer",
}, },
}, },
t = { ["<C-x>"] = { termcodes "<C-\\><C-N>", "escape terminal mode" } }, t = { ["<C-x>"] = { termcodes "<C-\\><C-N>", "escape terminal mode" } },
v = { v = {
["j"] = { 'v:count || mode(1)[0:1] == "no" ? "j" : "gj"', opts = { expr = true } }, ["j"] = { 'v:count || mode(1)[0:1] == "no" ? "j" : "gj"', opts = { expr = true } },
@ -84,49 +84,52 @@ M.general = {
M.tabufline = { M.tabufline = {
plugin = true, plugin = true,
n = { n = {
-- cycle through buffers -- cycle through buffers
["<TAB>"] = { ["<TAB>"] = {
function() function()
require("core.utils").tabuflineNext() require("core.utils").tabuflineNext()
end, end,
"goto next buffer", "goto next buffer",
}, },
["<S-Tab>"] = { ["<S-Tab>"] = {
function() function()
require("core.utils").tabuflinePrev() require("core.utils").tabuflinePrev()
end, end,
"goto prev buffer", "goto prev buffer",
}, },
-- pick buffers via numbers -- pick buffers via numbers
["<Bslash>"] = { "<cmd> TbufPick <CR>", "Pick buffer" }, ["<Bslash>"] = { "<cmd> TbufPick <CR>", "Pick buffer" },
}, },
} }
M.comment = { M.comment = {
plugin = true, plugin = true,
-- toggle comment in both modes -- toggle comment in both modes
n = { n = {
["<leader>/"] = { ["<leader>/"] = {
function() function()
require("Comment.api").toggle_current_linewise() require("Comment.api").toggle_current_linewise()
end, end,
"toggle comment", "toggle comment",
}, },
}, },
v = { v = {
["<leader>/"] = { ["<leader>/"] = {
"<ESC><cmd>lua require('Comment.api').toggle_linewise_op(vim.fn.visualmode())<CR>", "<ESC><cmd>lua require('Comment.api').toggle_linewise_op(vim.fn.visualmode())<CR>",
"toggle comment", "toggle comment",
}, },
}, },
} }
M.lspconfig = { M.lspconfig = {
plugin = true, plugin = true,
-- See `<cmd> :help vim.lsp.*` for documentation on any of the below functions -- See `<cmd> :help vim.lsp.*` for documentation on any of the below functions
n = { n = {
@ -134,181 +137,184 @@ M.lspconfig = {
function() function()
vim.lsp.buf.declaration() vim.lsp.buf.declaration()
end, end,
"lsp declaration", "lsp declaration",
}, },
["gd"] = { ["gd"] = {
function() function()
vim.lsp.buf.definition() vim.lsp.buf.definition()
end, end,
"lsp definition", "lsp definition",
}, },
["K"] = { ["K"] = {
function() function()
vim.lsp.buf.hover() vim.lsp.buf.hover()
end, end,
"lsp hover", "lsp hover",
}, },
["gi"] = { ["gi"] = {
function() function()
vim.lsp.buf.implementation() vim.lsp.buf.implementation()
end, end,
"lsp implementation", "lsp implementation",
}, },
["<leader>ls"] = { ["<leader>ls"] = {
function() function()
vim.lsp.buf.signature_help() vim.lsp.buf.signature_help()
end, end,
"lsp signature_help", "lsp signature_help",
}, },
["<leader>D"] = { ["<leader>D"] = {
function() function()
vim.lsp.buf.type_definition() vim.lsp.buf.type_definition()
end, end,
"lsp definition type", "lsp definition type",
}, },
["<leader>ra"] = { ["<leader>ra"] = {
function() function()
require("nvchad_ui.renamer").open() require("nvchad_ui.renamer").open()
end, end,
"lsp rename", "lsp rename",
}, },
["<leader>ca"] = { ["<leader>ca"] = {
function() function()
vim.lsp.buf.code_action() vim.lsp.buf.code_action()
end, end,
"lsp code_action", "lsp code_action",
}, },
["gr"] = { ["gr"] = {
function() function()
vim.lsp.buf.references() vim.lsp.buf.references()
end, end,
"lsp references", "lsp references",
}, },
["<leader>f"] = { ["<leader>f"] = {
function() function()
vim.diagnostic.open_float() vim.diagnostic.open_float()
end, end,
"floating diagnostic", "floating diagnostic",
}, },
["[d"] = { ["[d"] = {
function() function()
vim.diagnostic.goto_prev() vim.diagnostic.goto_prev()
end, end,
"goto prev", "goto prev",
}, },
["d]"] = { ["d]"] = {
function() function()
vim.diagnostic.goto_next() vim.diagnostic.goto_next()
end, end,
"goto_next", "goto_next",
}, },
["<leader>q"] = { ["<leader>q"] = {
function() function()
vim.diagnostic.setloclist() vim.diagnostic.setloclist()
end, end,
"diagnostic setloclist", "diagnostic setloclist",
}, },
["<leader>fm"] = { ["<leader>fm"] = {
function() function()
vim.lsp.buf.formatting {} vim.lsp.buf.formatting {}
end, end,
"lsp formatting", "lsp formatting",
}, },
["<leader>wa"] = { ["<leader>wa"] = {
function() function()
vim.lsp.buf.add_workspace_folder() vim.lsp.buf.add_workspace_folder()
end, end,
"add workspace folder", "add workspace folder",
}, },
["<leader>wr"] = { ["<leader>wr"] = {
function() function()
vim.lsp.buf.remove_workspace_folder() vim.lsp.buf.remove_workspace_folder()
end, end,
"remove workspace folder", "remove workspace folder",
}, },
["<leader>wl"] = { ["<leader>wl"] = {
function() function()
print(vim.inspect(vim.lsp.buf.list_workspace_folders())) print(vim.inspect(vim.lsp.buf.list_workspace_folders()))
end, end,
"list workspace folders", "list workspace folders",
}, },
}, },
} }
M.nvimtree = { M.nvimtree = {
plugin = true, plugin = true,
n = { n = {
-- toggle -- toggle
["<C-n>"] = { "<cmd> NvimTreeToggle <CR>", "toggle nvimtree" }, ["<C-n>"] = { "<cmd> NvimTreeToggle <CR>", "toggle nvimtree" },
-- focus -- focus
["<leader>e"] = { "<cmd> NvimTreeFocus <CR>", "focus nvimtree" }, ["<leader>e"] = { "<cmd> NvimTreeFocus <CR>", "focus nvimtree" },
}, },
} }
M.telescope = { M.telescope = {
plugin = true, plugin = true,
n = { n = {
-- find -- find
["<leader>ff"] = { "<cmd> Telescope find_files <CR>", "find files" }, ["<leader>ff"] = { "<cmd> Telescope find_files <CR>", "find files" },
["<leader>fa"] = { "<cmd> Telescope find_files follow=true no_ignore=true hidden=true <CR>", "find all" }, ["<leader>fa"] = { "<cmd> Telescope find_files follow=true no_ignore=true hidden=true <CR>", "find all" },
["<leader>fw"] = { "<cmd> Telescope live_grep <CR>", "live grep" }, ["<leader>fw"] = { "<cmd> Telescope live_grep <CR>", "live grep" },
["<leader>fb"] = { "<cmd> Telescope buffers <CR>", "find buffers" }, ["<leader>fb"] = { "<cmd> Telescope buffers <CR>", "find buffers" },
["<leader>fh"] = { "<cmd> Telescope help_tags <CR>", "help page" }, ["<leader>fh"] = { "<cmd> Telescope help_tags <CR>", "help page" },
["<leader>fo"] = { "<cmd> Telescope oldfiles <CR>", "find oldfiles" }, ["<leader>fo"] = { "<cmd> Telescope oldfiles <CR>", "find oldfiles" },
["<leader>tk"] = { "<cmd> Telescope keymaps <CR>", "show keys" }, ["<leader>tk"] = { "<cmd> Telescope keymaps <CR>", "show keys" },
-- git -- git
["<leader>cm"] = { "<cmd> Telescope git_commits <CR>", "git commits" }, ["<leader>cm"] = { "<cmd> Telescope git_commits <CR>", "git commits" },
["<leader>gt"] = { "<cmd> Telescope git_status <CR>", "git status" }, ["<leader>gt"] = { "<cmd> Telescope git_status <CR>", "git status" },
-- pick a hidden term -- pick a hidden term
["<leader>pt"] = { "<cmd> Telescope terms <CR>", "pick hidden term" }, ["<leader>pt"] = { "<cmd> Telescope terms <CR>", "pick hidden term" },
-- theme switcher -- theme switcher
["<leader>th"] = { "<cmd> Telescope themes <CR>", "nvchad themes" }, ["<leader>th"] = { "<cmd> Telescope themes <CR>", "nvchad themes" },
}, },
} }
M.nvterm = { M.nvterm = {
plugin = true, plugin = true,
t = { t = {
-- toggle in terminal mode -- toggle in terminal mode
["<A-i>"] = { ["<A-i>"] = {
function() function()
require("nvterm.terminal").toggle "float" require("nvterm.terminal").toggle "float"
end, end,
"toggle floating term", "toggle floating term",
}, },
["<A-h>"] = { ["<A-h>"] = {
function() function()
require("nvterm.terminal").toggle "horizontal" require("nvterm.terminal").toggle "horizontal"
end, end,
"toggle horizontal term", "toggle horizontal term",
}, },
["<A-v>"] = { ["<A-v>"] = {
function() function()
require("nvterm.terminal").toggle "vertical" require("nvterm.terminal").toggle "vertical"
end, end,
"toggle vertical term", "toggle vertical term",
}, },
}, },
@ -318,21 +324,21 @@ M.nvterm = {
function() function()
require("nvterm.terminal").toggle "float" require("nvterm.terminal").toggle "float"
end, end,
"toggle floating term", "toggle floating term",
}, },
["<A-h>"] = { ["<A-h>"] = {
function() function()
require("nvterm.terminal").toggle "horizontal" require("nvterm.terminal").toggle "horizontal"
end, end,
"toggle horizontal term", "toggle horizontal term",
}, },
["<A-v>"] = { ["<A-v>"] = {
function() function()
require("nvterm.terminal").toggle "vertical" require("nvterm.terminal").toggle "vertical"
end, end,
"toggle vertical term", "toggle vertical term",
}, },
-- new -- new
@ -341,39 +347,41 @@ M.nvterm = {
function() function()
require("nvterm.terminal").new "horizontal" require("nvterm.terminal").new "horizontal"
end, end,
"new horizontal term", "new horizontal term",
}, },
["<leader>v"] = { ["<leader>v"] = {
function() function()
require("nvterm.terminal").new "vertical" require("nvterm.terminal").new "vertical"
end, end,
"new vertical term", "new vertical term",
}, },
}, },
} }
M.whichkey = { M.whichkey = {
plugin = true, plugin = true,
n = { n = {
["<leader>wK"] = { ["<leader>wK"] = {
function() function()
vim.cmd "WhichKey" vim.cmd "WhichKey"
end, end,
"which-key all keymaps", "which-key all keymaps",
}, },
["<leader>wk"] = { ["<leader>wk"] = {
function() function()
local input = vim.fn.input "WhichKey: " local input = vim.fn.input "WhichKey: "
vim.cmd("WhichKey " .. input) vim.cmd("WhichKey " .. input)
end, end,
"which-key query lookup", "which-key query lookup",
}, },
}, },
} }
M.blankline = { M.blankline = {
plugin = true, plugin = true,
n = { n = {
["<leader>bc"] = { ["<leader>bc"] = {
function() function()
@ -388,7 +396,7 @@ M.blankline = {
end end
end, end,
"Jump to current_context", "Jump to current_context",
}, },
}, },
} }