Add help message for keybinds
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user