We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b3da612 commit ca8052fCopy full SHA for ca8052f
1 file changed
nvim/lua/plugins/floating-help.lua
@@ -0,0 +1,35 @@
1
+return {
2
+ "Tyler-Barham/floating-help.nvim",
3
+
4
+ config = function()
5
+ local fh = require("floating-help")
6
7
+ fh.setup()
8
9
+ -- Only replace cmds, not search; only replace the first instance
10
+ local function cmd_abbrev(abbrev, expansion)
11
+ local cmd = "cabbr "
12
+ .. abbrev
13
+ .. ' <c-r>=(getcmdpos() == 1 && getcmdtype() == ":" ? "'
14
+ .. expansion
15
+ .. '" : "'
16
17
+ .. '")<CR>'
18
+ vim.cmd(cmd)
19
+ end
20
21
+ -- Redirect `:h` to `:FloatingHelp`
22
+ cmd_abbrev("h", "FloatingHelp")
23
+ cmd_abbrev("help", "FloatingHelp")
24
+ cmd_abbrev("helpc", "FloatingHelpClose")
25
+ cmd_abbrev("helpclose", "FloatingHelpClose")
26
+ end,
27
28
+ keys = {
29
+ {
30
+ "<leader>H",
31
+ ":FloatingHelp<cr>",
32
+ desc = "Display help",
33
+ },
34
35
+}
0 commit comments