-
-
Notifications
You must be signed in to change notification settings - Fork 837
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
man_pages to support listing man pages for word under cursor #3278
Comments
would something like this suffice? require('telescope.builtin').man_pages({ sections = { 'ALL' }, default_text = vim.fn.expand('<cword>') }) |
@jamestrew, this will show too many entries as it will:
For example, for open(...) the list will be 939 entries long and will include, for example:
Using the proposed approach, there is no clutter and the only additional input required from the user (if at all) is to choose the correct section for the exact man page as word under cursor. For open, the list will be only:
|
there is nothing to do here, this is currently already possible. and the current solution is much more flexible rather than only an explicit cword option because it allows you to define how you want to execute the apropos call. Otherwise we would need to add even more options for regex, exact, full word matching etc ... You can use the following keymap if you are on an linux based system. I dont know if it also works on darwin/feebsd or if you have to slightly modify that command. You can test that with your cli vim.keymap.set("n", "<leader>om", function()
require("telescope.builtin").man_pages({
sections = { "ALL" },
man_cmd = { "apropos", "-r", "^" .. vim.fn.expand('<cword>') .. "$" }
})
end, { noremap = true }) |
:Telsecope man_pages
currently lists all man pages (from ALL or specific sections).It would be nice if there was an option for a programmer to list all relevant man pages for the (API) word under cursor in the source code.
For example, for open(...), the list will be:
Proposal: add a boolean option
cword
, that if true, would only show man pages for words under cursor.:Telescope man_pages cword=true
The text was updated successfully, but these errors were encountered: