From ed9871ae0da11db8e1e8dfb8ff2966a9b98cea30 Mon Sep 17 00:00:00 2001 From: Saumit Dinesan Date: Sat, 22 Jul 2023 16:06:15 +0530 Subject: nvim: lspsaga and whichkey update --- .config/nvim/lua/justsaumit/which-key-config.lua | 37 ++++++++++++++++++++++-- 1 file changed, 34 insertions(+), 3 deletions(-) (limited to '.config/nvim/lua/justsaumit/which-key-config.lua') diff --git a/.config/nvim/lua/justsaumit/which-key-config.lua b/.config/nvim/lua/justsaumit/which-key-config.lua index 16ffedd..93a42fa 100644 --- a/.config/nvim/lua/justsaumit/which-key-config.lua +++ b/.config/nvim/lua/justsaumit/which-key-config.lua @@ -14,11 +14,42 @@ local mappings = { w = {":w", "Save"}, x ={":bdelete", "Close"}, E = { ":e ~/.config/nvim/init.lua", "Edit config" }, - f = { ":Telescope find_files", "Telescope Find Files" }, - h = { ":Telescope find_files hidden=true", "Telescope Find Files" }, - g = { ":Telescope live_grep", "Telescope Live Grep" }, + f = { + name = "Telescope", + f = {":Telescope find_files", "Telescope Find Files" }, + h = { ":Telescope find_files hidden=true", "Telescope Find Files" }, + g = { ":Telescope live_grep", "Telescope Live Grep" }, + }, r = { ":Telescope oldfiles", "Recent files" }, + l = { + name = "LSP", + i = {":LspInfo", "Connected Language Servers"}, + I = {'LspInstallInfo', 'Install language server'}, + f = {'lua vim.lsp.buf.formatting()', "Format File"}, + k = {" lua vim.lsp.buf.signature_help()", "Signature Help"}, + -- K = {'lua vim.lsp.buf.hover()', "Hover"}, + K = {" Lspsaga hover_doc", "Hover Commands"}, + w = {" lua vim.lsp.add_workspace_folder()", "Add Workspace Folder"}, + W = {" lua vim.lsp.remove_workspace_folder()", "Remove Workspace Folder"}, + l = {" lua print(vim.inspect(vim.lsp.buf.list_workspace_folders()))", "List Workspace Folder"}, + t = {'lua vim.lsp.buf.type_definition()', "Type definition"}, + d = {" lua vim.lsp.buf.definition()", "Go to Definition"}, + D = {" lua vim.lsp.buf.declaration()", "Go to Declaration"}, + r = {" lua vim.lsp.buf.references()", "References"}, + R = {" Lspsaga rename", "Rename"}, + -- R = {'lua vim.lsp.buf.rename()', "Rename"}, + a = {" Lspsaga code_action", "Code Action"}, + -- a = {'lua vim.lsp.buf.code_action()', "Code actions"}, + -- T = {' Telescope diagnostics bufnr=0', "Get Diagnostics"} + go = {"Lspsaga show_line_diagnostics","Show Line Diagnostic"}, + -- e = {'lua vim.diagnostic.show_line_diagnostics()', "Show line diagnostics"}, + gj = {"Lspsaga diagnostic_jump_next","Go to Next Diagnostic"}, + -- n = {'lua vim.diagnostic.goto_next()', "Go to next diagnostic"}, + gk = {"Lspsaga diagnostic_jump_prev","Go to Prev Diagnostic"}, + -- N = {'lua vim.diagnostic.goto_prev()', "Go to previous diagnostic"}, + }, t = { + name = "ToggleTerm", t = { ":ToggleTerm", "Split Below" }, f = { toggle_float, "Floating Terminal" }, l = { toggle_lazygit, "Lazygit" }, -- cgit v1.2.3