From 7482314fda11bcb792f1e72b395072735a80ab44 Mon Sep 17 00:00:00 2001 From: Christian Segundo Date: Thu, 18 Apr 2024 20:56:22 +0200 Subject: bump which key --- lua/plugins/core/which-key.lua | 89 +++++++++++++++++++++++------------------- 1 file changed, 48 insertions(+), 41 deletions(-) (limited to 'lua/plugins') diff --git a/lua/plugins/core/which-key.lua b/lua/plugins/core/which-key.lua index 6e046a3..6513714 100644 --- a/lua/plugins/core/which-key.lua +++ b/lua/plugins/core/which-key.lua @@ -1,45 +1,52 @@ return { - "folke/which-key.nvim", - event = "VeryLazy", - init = function() - vim.o.timeout = true - vim.o.timeoutlen = 300 - end, + "folke/which-key.nvim", + event = "VeryLazy", + init = function() + vim.o.timeout = true + vim.o.timeoutlen = 300 + end, - opts = { - f = { name = "File" }, - b = { - name = "Buffer", - n = { "BufferNext", "Next" }, - p = { "BufferPrevious", "Previous" }, - c = { "BufferClose", "Close" }, - ["1"] = { "BufferGoto 1", "1" }, - ["2"] = { "BufferGoto 2", "2" }, - ["3"] = { "BufferGoto 3", "3" }, - ["4"] = { "BufferGoto 4", "4" }, - ["5"] = { "BufferGoto 5", "5" }, - ["6"] = { "BufferGoto 6", "6" }, - ["7"] = { "BufferGoto 7", "7" }, - ["8"] = { "BufferGoto 8", "8" }, - ["9"] = { "BufferGoto 9", "9" }, - }, - l = { - name = "LSP", - a = { "lua vim.lsp.buf.code_action()", "Action" }, - f = { "lua vim.lsp.buf.format({ async = false, timeout_ms = 5000 })", "Format" }, - d = { "lua vim.diagnostic.open_float()", "Diagnostic" }, - h = { "lua vim.lsp.buf.hover()", "Help" }, - g = { - name = "Go to", - D = { "lua vim.lsp.buf.declaration()", "Go to declaration" }, - d = { "lua vim.lsp.buf.definition()", "Go to definition" }, - i = { "lua vim.lsp.buf.definition()", "Go to implementation" }, - }, - }, - }, + opts = { + f = { name = "File" }, + t = { + name = "Tab", + c = { "tabnew", "Create" }, + ["1"] = { "1gt", "1" }, + ["2"] = { "2gt", "2" }, + ["3"] = { "3gt", "3" }, + ["4"] = { "4gt", "4" }, + ["5"] = { "5gt", "5" }, + ["6"] = { "6gt", "6" }, + ["7"] = { "7gt", "7" }, + ["8"] = { "8gt", "8" }, + ["9"] = { "9gt", "9" }, + }, + b = { + name = "Buffer", + n = { "BufferNext", "Next" }, + p = { "BufferPrevious", "Previous" }, + c = { "BufferClose", "Close" }, + }, + l = { + name = "LSP", + a = { "lua vim.lsp.buf.code_action()", "Action" }, + f = { + "lua vim.lsp.buf.format({ async = false, timeout_ms = 5000 })", + "Format", + }, + d = { "lua vim.diagnostic.open_float()", "Diagnostic" }, + h = { "lua vim.lsp.buf.hover()", "Help" }, + g = { + name = "Go to", + D = { "lua vim.lsp.buf.declaration()", "Go to declaration" }, + d = { "lua vim.lsp.buf.definition()", "Go to definition" }, + i = { "lua vim.lsp.buf.definition()", "Go to implementation" }, + }, + }, + }, - config = function(_, opts) - local wk = require("which-key") - wk.register(opts, { prefix = "" }) - end, + config = function(_, opts) + local wk = require("which-key") + wk.register(opts, { prefix = "" }) + end, } -- cgit v1.2.3