Add help message for keybinds

This commit is contained in:
Omar Zeghouani
2021-08-20 13:29:07 +01:00
parent a1dd300530
commit 970d9932c5
4 changed files with 12 additions and 1 deletions

View File

@@ -223,6 +223,9 @@ local function setup_keymaps(bufnr)
-- code actions
nmap(config.options.keymaps.code_actions,
":lua require('symbols-outline.code_action').show_code_actions()<Cr>")
-- show help
nmap(config.options.keymaps.show_help,
":lua require('symbols-outline.config').show_help()<Cr>")
-- close outline
nmap(config.options.keymaps.close, ":bw!<Cr>")
end

View File

@@ -18,7 +18,8 @@ local defaults = {
hover_symbol = "<C-space>",
preview_symbol = "K",
rename_symbol = "r",
code_actions = "a"
code_actions = "a",
show_help = "?",
},
lsp_blacklist = {},
symbol_blacklist = {},
@@ -93,6 +94,11 @@ function M.is_client_blacklisted(client_id)
return has_value(M.options.lsp_blacklist, client.name)
end
function M.show_help()
print "Current keymaps:"
print(vim.inspect(M.options.keymaps))
end
function M.setup(options)
M.options = vim.tbl_deep_extend("force", {}, defaults, options or {})
end