Skip to content
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 - list man pages for word under cursor #3274

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

dsirov
Copy link

@dsirov dsirov commented Sep 2, 2024

Description

  1. Add a cword boolean option to list man pages for word under cursor.
  2. Change the default section from 1 to ALL

This now allows 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:

  • open (3pm)
  • open (2)

This resolves #3278

Type of change

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

Running telescope:

  • Telescope man_pages
  • Telescope man_pages cword=true
  • Telescope man_pages sections={"2"} cword=true
  • Telescope man_pages sections={"ALL"}
  • Telescope man_pages sections={"1"} cword=false
  • Telescope man_pages sections={"1"} cword=invalidstring
  • Telescope man_pages sections={"1"} cword=1

Configuration:

  • Neovim version (nvim --version):
NVIM v0.10.0
Build type: Release
LuaJIT 2.1.1713484068
  • Operating system and version:
    Fedora 39

Checklist:

  • My code follows the style guidelines of this project (stylua)
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation (lua annotations)

This seems more sensible for general use, especially when using the cword option
to list man pages for word under cursor. For example, C/CPP code usually uses functions
from section 2 or 3...
@dsirov dsirov changed the title man_pages - list man pages for word under cursor man_pages - list man pages for word under cursor #3278 Sep 4, 2024
@dsirov dsirov changed the title man_pages - list man pages for word under cursor #3278 man_pages - list man pages for word under cursor Sep 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

man_pages to support listing man pages for word under cursor
1 participant