Add help message for keybinds
This commit is contained in:
@@ -112,4 +112,5 @@ vim.g.symbols_outline = {
|
|||||||
| K | Show current symbol preview |
|
| K | Show current symbol preview |
|
||||||
| r | Rename symbol |
|
| r | Rename symbol |
|
||||||
| a | Code actions |
|
| a | Code actions |
|
||||||
|
| ? | Show help message |
|
||||||
|
|
||||||
|
|||||||
@@ -236,6 +236,7 @@ symbol_blacklist
|
|||||||
| K | Show current symbol preview |
|
| K | Show current symbol preview |
|
||||||
| r | Rename symbol |
|
| r | Rename symbol |
|
||||||
| a | Code actions |
|
| a | Code actions |
|
||||||
|
| ? | Show help message |
|
||||||
|
|
||||||
================================================================================
|
================================================================================
|
||||||
vim:tw=79:ts=8:ft=help:norl
|
vim:tw=79:ts=8:ft=help:norl
|
||||||
|
|||||||
@@ -223,6 +223,9 @@ local function setup_keymaps(bufnr)
|
|||||||
-- code actions
|
-- code actions
|
||||||
nmap(config.options.keymaps.code_actions,
|
nmap(config.options.keymaps.code_actions,
|
||||||
":lua require('symbols-outline.code_action').show_code_actions()<Cr>")
|
":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
|
-- close outline
|
||||||
nmap(config.options.keymaps.close, ":bw!<Cr>")
|
nmap(config.options.keymaps.close, ":bw!<Cr>")
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -18,7 +18,8 @@ local defaults = {
|
|||||||
hover_symbol = "<C-space>",
|
hover_symbol = "<C-space>",
|
||||||
preview_symbol = "K",
|
preview_symbol = "K",
|
||||||
rename_symbol = "r",
|
rename_symbol = "r",
|
||||||
code_actions = "a"
|
code_actions = "a",
|
||||||
|
show_help = "?",
|
||||||
},
|
},
|
||||||
lsp_blacklist = {},
|
lsp_blacklist = {},
|
||||||
symbol_blacklist = {},
|
symbol_blacklist = {},
|
||||||
@@ -93,6 +94,11 @@ function M.is_client_blacklisted(client_id)
|
|||||||
return has_value(M.options.lsp_blacklist, client.name)
|
return has_value(M.options.lsp_blacklist, client.name)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function M.show_help()
|
||||||
|
print "Current keymaps:"
|
||||||
|
print(vim.inspect(M.options.keymaps))
|
||||||
|
end
|
||||||
|
|
||||||
function M.setup(options)
|
function M.setup(options)
|
||||||
M.options = vim.tbl_deep_extend("force", {}, defaults, options or {})
|
M.options = vim.tbl_deep_extend("force", {}, defaults, options or {})
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user