From 77cdf208765ad351e48724ed5ad57e55703eca61 Mon Sep 17 00:00:00 2001 From: Gustaf Rydholm Date: Tue, 5 Oct 2021 08:46:35 +0200 Subject: Add major update to LSP from lunarvim --- .config/nvim/lua/core/which-key.lua | 47 ++++++++++++++++++++++++++++++------- 1 file changed, 38 insertions(+), 9 deletions(-) (limited to '.config/nvim/lua/core/which-key.lua') diff --git a/.config/nvim/lua/core/which-key.lua b/.config/nvim/lua/core/which-key.lua index d4ef1a2..db67055 100644 --- a/.config/nvim/lua/core/which-key.lua +++ b/.config/nvim/lua/core/which-key.lua @@ -162,8 +162,14 @@ M.config = function() p = { name = "Peek", d = { "lua require('lsp.peek').Peek('definition')", "Definition" }, - t = { "lua require('lsp.peek').Peek('typeDefinition')", "Type Definition" }, - i = { "lua require('lsp.peek').Peek('implementation')", "Implementation" }, + t = { + "lua require('lsp.peek').Peek('typeDefinition')", + "Type Definition", + }, + i = { + "lua require('lsp.peek').Peek('implementation')", + "Implementation", + }, }, q = { "lua vim.lsp.diagnostic.set_loclist()", "Quickfix" }, r = { "lua vim.lsp.buf.rename()", "Rename" }, @@ -179,23 +185,46 @@ M.config = function() "edit ~/.config/nvim/config.lua", "Edit config.lua", }, - k = { "lua require('keymappings').print()", "View LunarVim's default keymappings" }, + k = { + "lua require('keymappings').print()", + "View LunarVim's default keymappings", + }, i = { "lua require('core.info').toggle_popup(vim.bo.filetype)", "Toggle nvim Info", }, l = { name = "+logs", - D = { "edit ~/.cache/nvim/lunarvim.log", "Open the default logfile" }, - n = { "lua require('core.terminal').toggle_log_view('lsp')", "view lsp log" }, - N = { "edit ~/.cache/nvim/log", "Open the Neovim logfile" }, - l = { "lua require('core.terminal').toggle_log_view('nvim')", "view neovim log" }, - L = { "edit ~/.cache/nvim/lsp.log", "Open the LSP logfile" }, + d = { + "lua require('core.terminal').toggle_log_view(require('core.log').get_path())", + "view default log", + }, + D = { + "lua vim.fn.execute('edit ' .. require('core.log').get_path())", + "Open the default logfile", + }, + l = { + "lua require('core.terminal').toggle_log_view(vim.lsp.get_log_path())", + "view lsp log", + }, + L = { + "lua vim.fn.execute('edit ' .. vim.lsp.get_log_path())", + "Open the LSP logfile", + }, + n = { + "lua require('core.terminal').toggle_log_view(os.getenv('NVIM_LOG_FILE'))", + "view neovim log", + }, + N = { "edit $NVIM_LOG_FILE", "Open the Neovim logfile" }, p = { "lua require('core.terminal').toggle_log_view('packer.nvim')", "view packer log", }, - P = { "edit ~/.cache/nvim/packer.nvim.log", "Open the Packer logfile" }, + P = { + "exe 'edit '.stdpath('cache').'/packer.nvim.log'", + "Open the Packer logfile", + }, + r = { "lua require('utils').reload_config()", "Reload configurations" }, }, }, s = { -- cgit v1.2.3-70-g09d2