Manpages provider only searches for certain sections
I couldn't make man pages from man3 section show up. Turns out Man provider only searches for certain sections, (n or '1'). Assuming n is for tcl stuff
local word = vim.fn.expand('<cword>')
local uri
if vim.bo[opts.bufnr].filetype == 'tcl' then
uri = string.format('man://%s(n)', word)
else
uri = string.format('man://%s', word)
end
should work better ? Maybe could be behind a config ? I don't know what people would prefer.
Hey 🙂 Can you give me an example of what exactly you want to achieve?
E.g. if I create a buffer with ft=c with the following content (ignoring that this will not run 😅):
void main() {
accept(); // <-- put cursor at accept
}
and move the cursor over accept and open hovercraft.nvim with the Man provider, it will show me the docs for accept from section 2.
A concrete example would be highly appreciated, since I guess I do not fully understand the problem at hand.
I am trying to make vulkan man3 pages show up when i hover on vulkan functions. I got it working when i changed the code to above shared to snippet
That is interesting! Can you share some code snippet and man pages for me to test?