From 4f4c43a2b9f0e8da952dafdb3d9229730b92640a Mon Sep 17 00:00:00 2001 From: siduck Date: Sun, 28 Apr 2024 16:24:59 +0530 Subject: [PATCH] dont capitalize mapping desc https://github.com/NvChad/ui/commit/b6b55e8055fda90e5722d11da97538f671c7f429 --- lua/nvchad/mappings.lua | 102 ++++++++++++++++++------------------ lua/nvchad/plugins/init.lua | 12 ++--- 2 files changed, 57 insertions(+), 57 deletions(-) diff --git a/lua/nvchad/mappings.lua b/lua/nvchad/mappings.lua index df3e41e..e24dee6 100644 --- a/lua/nvchad/mappings.lua +++ b/lua/nvchad/mappings.lua @@ -1,122 +1,122 @@ local map = vim.keymap.set -map("i", "", "^i", { desc = "Move Beginning of line" }) -map("i", "", "", { desc = "Move End of line" }) -map("i", "", "", { desc = "Move Left" }) -map("i", "", "", { desc = "Move Right" }) -map("i", "", "", { desc = "Move Down" }) -map("i", "", "", { desc = "Move Up" }) +map("i", "", "^i", { desc = "move beginning of line" }) +map("i", "", "", { desc = "move end of line" }) +map("i", "", "", { desc = "move left" }) +map("i", "", "", { desc = "move right" }) +map("i", "", "", { desc = "move down" }) +map("i", "", "", { desc = "move up" }) -map("n", "", "noh", { desc = "General Clear highlights" }) +map("n", "", "noh", { desc = "general clear highlights" }) -map("n", "", "h", { desc = "Switch Window left" }) -map("n", "", "l", { desc = "Switch Window right" }) -map("n", "", "j", { desc = "Switch Window down" }) -map("n", "", "k", { desc = "Switch Window up" }) +map("n", "", "h", { desc = "switch window left" }) +map("n", "", "l", { desc = "switch window right" }) +map("n", "", "j", { desc = "switch window down" }) +map("n", "", "k", { desc = "switch window up" }) -map("n", "", "w", { desc = "File Save" }) -map("n", "", "%y+", { desc = "File Copy whole" }) +map("n", "", "w", { desc = "file save" }) +map("n", "", "%y+", { desc = "file copy whole" }) -map("n", "n", "set nu!", { desc = "Toggle Line number" }) -map("n", "rn", "set rnu!", { desc = "Toggle Relative number" }) -map("n", "ch", "NvCheatsheet", { desc = "Toggle NvCheatsheet" }) +map("n", "n", "set nu!", { desc = "toggle line number" }) +map("n", "rn", "set rnu!", { desc = "toggle relative number" }) +map("n", "ch", "NvCheatsheet", { desc = "toggle nvcheatsheet" }) map("n", "fm", function() require("conform").format { lsp_fallback = true } -end, { desc = "Format Files" }) +end, { desc = "format files" }) -- global lsp mappings -map("n", "lf", vim.diagnostic.open_float, { desc = "Lsp floating diagnostics" }) -map("n", "[d", vim.diagnostic.goto_prev, { desc = "Lsp prev diagnostic" }) -map("n", "]d", vim.diagnostic.goto_next, { desc = "Lsp next diagnostic" }) -map("n", "q", vim.diagnostic.setloclist, { desc = "Lsp diagnostic loclist" }) +map("n", "lf", vim.diagnostic.open_float, { desc = "lsp floating diagnostics" }) +map("n", "[d", vim.diagnostic.goto_prev, { desc = "lsp prev diagnostic" }) +map("n", "]d", vim.diagnostic.goto_next, { desc = "lsp next diagnostic" }) +map("n", "q", vim.diagnostic.setloclist, { desc = "lsp diagnostic loclist" }) -- tabufline -map("n", "b", "enew", { desc = "Buffer New" }) +map("n", "b", "enew", { desc = "buffer new" }) map("n", "", function() require("nvchad.tabufline").next() -end, { desc = "Buffer Goto next" }) +end, { desc = "buffer goto next" }) map("n", "", function() require("nvchad.tabufline").prev() -end, { desc = "Buffer Goto prev" }) +end, { desc = "buffer goto prev" }) map("n", "x", function() require("nvchad.tabufline").close_buffer() -end, { desc = "Buffer Close" }) +end, { desc = "buffer close" }) -- Comment map("n", "/", function() require("Comment.api").toggle.linewise.current() -end, { desc = "Comment Toggle" }) +end, { desc = "comment toggle" }) map( "v", "/", "lua require('Comment.api').toggle.linewise(vim.fn.visualmode())", - { desc = "Comment Toggle" } + { desc = "comment toggle" } ) -- nvimtree -map("n", "", "NvimTreeToggle", { desc = "Nvimtree Toggle window" }) -map("n", "e", "NvimTreeFocus", { desc = "Nvimtree Focus window" }) +map("n", "", "NvimTreeToggle", { desc = "nvimtree toggle window" }) +map("n", "e", "NvimTreeFocus", { desc = "nvimtree focus window" }) -- telescope -map("n", "fw", "Telescope live_grep", { desc = "Telescope Live grep" }) -map("n", "fb", "Telescope buffers", { desc = "Telescope Find buffers" }) -map("n", "fh", "Telescope help_tags", { desc = "Telescope Help page" }) -map("n", "ma", "Telescope marks", { desc = "Telescope Find marks" }) -map("n", "fo", "Telescope oldfiles", { desc = "Telescope Find oldfiles" }) -map("n", "fz", "Telescope current_buffer_fuzzy_find", { desc = "Telescope Find in current buffer" }) -map("n", "cm", "Telescope git_commits", { desc = "Telescope Git commits" }) -map("n", "gt", "Telescope git_status", { desc = "Telescope Git status" }) -map("n", "pt", "Telescope terms", { desc = "Telescope Pick hidden term" }) -map("n", "th", "Telescope themes", { desc = "Telescope Nvchad themes" }) -map("n", "ff", "Telescope find_files", { desc = "Telescope Find files" }) +map("n", "fw", "Telescope live_grep", { desc = "telescope live grep" }) +map("n", "fb", "Telescope buffers", { desc = "telescope find buffers" }) +map("n", "fh", "Telescope help_tags", { desc = "telescope help page" }) +map("n", "ma", "Telescope marks", { desc = "telescope find marks" }) +map("n", "fo", "Telescope oldfiles", { desc = "telescope find oldfiles" }) +map("n", "fz", "Telescope current_buffer_fuzzy_find", { desc = "telescope find in current buffer" }) +map("n", "cm", "Telescope git_commits", { desc = "telescope git commits" }) +map("n", "gt", "Telescope git_status", { desc = "telescope git status" }) +map("n", "pt", "Telescope terms", { desc = "telescope pick hidden term" }) +map("n", "th", "Telescope themes", { desc = "telescope nvchad themes" }) +map("n", "ff", "Telescope find_files", { desc = "telescope find files" }) map( "n", "fa", "Telescope find_files follow=true no_ignore=true hidden=true", - { desc = "Telescope Find all files" } + { desc = "telescope find all files" } ) -- terminal -map("t", "", "", { desc = "Terminal Escape terminal mode" }) +map("t", "", "", { desc = "terminal escape terminal mode" }) -- new terminals map("n", "h", function() require("nvchad.term").new { pos = "sp" } -end, { desc = "Terminal New horizontal term" }) +end, { desc = "terminal new horizontal term" }) map("n", "v", function() require("nvchad.term").new { pos = "vsp" } -end, { desc = "Terminal New vertical window" }) +end, { desc = "terminal new vertical window" }) -- toggleable map({ "n", "t" }, "", function() require("nvchad.term").toggle { pos = "vsp", id = "vtoggleTerm" } -end, { desc = "Terminal Toggleable vertical term" }) +end, { desc = "terminal toggleable vertical term" }) map({ "n", "t" }, "", function() require("nvchad.term").toggle { pos = "sp", id = "htoggleTerm" } -end, { desc = "Terminal New horizontal term" }) +end, { desc = "terminal new horizontal term" }) map({ "n", "t" }, "", function() require("nvchad.term").toggle { pos = "float", id = "floatTerm" } -end, { desc = "Terminal Toggle Floating term" }) +end, { desc = "terminal toggle floating term" }) map("t", "", function() local win = vim.api.nvim_get_current_win() vim.api.nvim_win_close(win, true) -end, { desc = "Terminal Close term in terminal mode" }) +end, { desc = "terminal close term in terminal mode" }) -- whichkey -map("n", "wK", "WhichKey ", { desc = "Whichkey all keymaps" }) +map("n", "wK", "WhichKey ", { desc = "whichkey all keymaps" }) map("n", "wk", function() vim.cmd("WhichKey " .. vim.fn.input "WhichKey: ") -end, { desc = "Whichkey query lookup" }) +end, { desc = "whichkey query lookup" }) -- blankline map("n", "cc", function() @@ -132,4 +132,4 @@ map("n", "cc", function() vim.api.nvim_feedkeys("_", "n", true) end end -end, { desc = "Blankline Jump to current context" }) +end, { desc = "blankline jump to current context" }) diff --git a/lua/nvchad/plugins/init.lua b/lua/nvchad/plugins/init.lua index 4669a3d..3ebafe1 100644 --- a/lua/nvchad/plugins/init.lua +++ b/lua/nvchad/plugins/init.lua @@ -125,12 +125,12 @@ return { { "numToStr/Comment.nvim", keys = { - { "gcc", mode = "n", desc = "Comment toggle current line" }, - { "gc", mode = { "n", "o" }, desc = "Comment toggle linewise" }, - { "gc", mode = "x", desc = "Comment toggle linewise (visual)" }, - { "gbc", mode = "n", desc = "Comment toggle current block" }, - { "gb", mode = { "n", "o" }, desc = "Comment toggle blockwise" }, - { "gb", mode = "x", desc = "Comment toggle blockwise (visual)" }, + { "gcc", mode = "n", desc = "comment toggle current line" }, + { "gc", mode = { "n", "o" }, desc = "comment toggle linewise" }, + { "gc", mode = "x", desc = "comment toggle linewise (visual)" }, + { "gbc", mode = "n", desc = "comment toggle current block" }, + { "gb", mode = { "n", "o" }, desc = "comment toggle blockwise" }, + { "gb", mode = "x", desc = "comment toggle blockwise (visual)" }, }, config = function(_, opts) require("Comment").setup(opts)