diff options
author | Gustaf Rydholm <gustaf.rydholm@gmail.com> | 2021-10-05 08:46:35 +0200 |
---|---|---|
committer | Gustaf Rydholm <gustaf.rydholm@gmail.com> | 2021-10-05 08:46:35 +0200 |
commit | 77cdf208765ad351e48724ed5ad57e55703eca61 (patch) | |
tree | 7f19757b255ab66895d9240a5aca77a35cef8aac /.config/nvim/lua/core/which-key.lua | |
parent | 4fd170aa9d55b7bcd1f0a9445c9e136b560e3220 (diff) |
Add major update to LSP from lunarvim
Diffstat (limited to '.config/nvim/lua/core/which-key.lua')
-rw-r--r-- | .config/nvim/lua/core/which-key.lua | 47 |
1 files changed, 38 insertions, 9 deletions
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 = { "<cmd>lua require('lsp.peek').Peek('definition')<cr>", "Definition" }, - t = { "<cmd>lua require('lsp.peek').Peek('typeDefinition')<cr>", "Type Definition" }, - i = { "<cmd>lua require('lsp.peek').Peek('implementation')<cr>", "Implementation" }, + t = { + "<cmd>lua require('lsp.peek').Peek('typeDefinition')<cr>", + "Type Definition", + }, + i = { + "<cmd>lua require('lsp.peek').Peek('implementation')<cr>", + "Implementation", + }, }, q = { "<cmd>lua vim.lsp.diagnostic.set_loclist()<cr>", "Quickfix" }, r = { "<cmd>lua vim.lsp.buf.rename()<cr>", "Rename" }, @@ -179,23 +185,46 @@ M.config = function() "<cmd>edit ~/.config/nvim/config.lua<cr>", "Edit config.lua", }, - k = { "<cmd>lua require('keymappings').print()<cr>", "View LunarVim's default keymappings" }, + k = { + "<cmd>lua require('keymappings').print()<cr>", + "View LunarVim's default keymappings", + }, i = { "<cmd>lua require('core.info').toggle_popup(vim.bo.filetype)<cr>", "Toggle nvim Info", }, l = { name = "+logs", - D = { "<cmd>edit ~/.cache/nvim/lunarvim.log<cr>", "Open the default logfile" }, - n = { "<cmd>lua require('core.terminal').toggle_log_view('lsp')<cr>", "view lsp log" }, - N = { "<cmd>edit ~/.cache/nvim/log<cr>", "Open the Neovim logfile" }, - l = { "<cmd>lua require('core.terminal').toggle_log_view('nvim')<cr>", "view neovim log" }, - L = { "<cmd>edit ~/.cache/nvim/lsp.log<cr>", "Open the LSP logfile" }, + d = { + "<cmd>lua require('core.terminal').toggle_log_view(require('core.log').get_path())<cr>", + "view default log", + }, + D = { + "<cmd>lua vim.fn.execute('edit ' .. require('core.log').get_path())<cr>", + "Open the default logfile", + }, + l = { + "<cmd>lua require('core.terminal').toggle_log_view(vim.lsp.get_log_path())<cr>", + "view lsp log", + }, + L = { + "<cmd>lua vim.fn.execute('edit ' .. vim.lsp.get_log_path())<cr>", + "Open the LSP logfile", + }, + n = { + "<cmd>lua require('core.terminal').toggle_log_view(os.getenv('NVIM_LOG_FILE'))<cr>", + "view neovim log", + }, + N = { "<cmd>edit $NVIM_LOG_FILE<cr>", "Open the Neovim logfile" }, p = { "<cmd>lua require('core.terminal').toggle_log_view('packer.nvim')<cr>", "view packer log", }, - P = { "<cmd>edit ~/.cache/nvim/packer.nvim.log<cr>", "Open the Packer logfile" }, + P = { + "<cmd>exe 'edit '.stdpath('cache').'/packer.nvim.log'<cr>", + "Open the Packer logfile", + }, + r = { "<cmd>lua require('utils').reload_config()<cr>", "Reload configurations" }, }, }, s = { |