From 8ec50e55a45af1706d40eff292db4541b6fcc261 Mon Sep 17 00:00:00 2001 From: Akshay Nair Date: Fri, 8 Aug 2025 13:08:44 +0530 Subject: Embed docs as null://docs + web.help api --- init.lua | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'init.lua') diff --git a/init.lua b/init.lua index 022be69..a8d1799 100644 --- a/init.lua +++ b/init.lua @@ -64,6 +64,15 @@ require 'null-browser.extras.statusline'.init { decoration = web.decorations.bottom, } + +web.keymap.set('n', '', function() + local symbols = web.help.get_items() + menu:select(symbols, { select_last_line = true }, function(err, selection) + if err then return end + web.help.show(web.utils.string_trim(selection)) + end) +end) + local hints = require 'null-browser.extras.hints' hints.init() web.keymap.set('n', 'f', function() hints.start('a[href], button', hints.action.open_in_view) end) -- cgit v1.3.1