summaryrefslogtreecommitdiff
path: root/lua/core/which-key.lua
diff options
context:
space:
mode:
authorkylo252 <[email protected]>2021-08-09 19:02:37 +0200
committerGitHub <[email protected]>2021-08-09 19:02:37 +0200
commit405423108fc31981c40116a827e845a1179c9053 (patch)
tree41a7cb23536c982ccdc3402ab9d4602f2538eb40 /lua/core/which-key.lua
parent625df947dcacf3804f4ec7335478535ecd8219af (diff)
feat: Add an async logger using plenary (#1207)
Co-authored-by: rebuilt <[email protected]>
Diffstat (limited to 'lua/core/which-key.lua')
-rw-r--r--lua/core/which-key.lua20
1 files changed, 19 insertions, 1 deletions
diff --git a/lua/core/which-key.lua b/lua/core/which-key.lua
index 268243e4..90bf1ace 100644
--- a/lua/core/which-key.lua
+++ b/lua/core/which-key.lua
@@ -1,4 +1,5 @@
local M = {}
+local Log = require "core.log"
M.config = function()
lvim.builtin.which_key = {
active = false,
@@ -173,8 +174,24 @@ M.config = function()
"<cmd>lua require('core.info').toggle_popup(vim.bo.filetype)<cr>",
"Toggle LunarVim Info",
},
+ l = {
+ name = "+logs",
+ d = {
+ "<cmd>lua require('core.terminal').toggle_log_view('lunarvim')<cr>",
+ "view default log",
+ },
+ 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" },
+ 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" },
+ },
},
-
s = {
name = "Search",
b = { "<cmd>Telescope git_branches<cr>", "Checkout branch" },
@@ -206,6 +223,7 @@ M.setup = function()
-- end
local status_ok, which_key = pcall(require, "which-key")
if not status_ok then
+ Log:get_default "Failed to load whichkey"
return
end