diff --git a/.config/nvim/lua/plugins/which-key.lua b/.config/nvim/lua/plugins/which-key.lua index dd01f41..24e7a57 100644 --- a/.config/nvim/lua/plugins/which-key.lua +++ b/.config/nvim/lua/plugins/which-key.lua @@ -1,3 +1,8 @@ +local function insert_current_date() + local date = vim.fn.system('date "+%a %d %b"'):gsub('\n', '') + vim.api.nvim_put({date}, 'c', false, true) +end + return { "folke/which-key.nvim", event = "VeryLazy", @@ -8,5 +13,7 @@ return { { "s", ":Telescope live_grep", desc = "Search file content (requires ripgrep)" }, { ">", ":lua vim.diagnostic.goto_next()", desc = "Jump to next issue" }, { "<", ":lua vim.diagnostic.goto_prev()", desc = "Jump to prev issue" }, + { "t", insert_current_date, desc = "Enter current date" }, }, } +