Skip to content

Access shortcut funcs through extensions#101

Open
jesseleite wants to merge 4 commits into
nvim-telescope:masterfrom
jesseleite:access-shortcut-funcs-through-extensions
Open

Access shortcut funcs through extensions#101
jesseleite wants to merge 4 commits into
nvim-telescope:masterfrom
jesseleite:access-shortcut-funcs-through-extensions

Conversation

@jesseleite

@jesseleite jesseleite commented Jan 10, 2026

Copy link
Copy Markdown
Contributor

Description

This PR allows us to keymap shortcut through the extensions object, rather than having to require a different object, which is just syntactical sugar and looks cleaner. I think the whole extensions.live_grep_args scoping allows for this nicely. Also, this is backwards compatible, people can still map to the old shortcuts module directly too.

Before

require("telescope").extensions.live_grep_args.live_grep_args()
require("telescope-live-grep-args.shortcuts").grep_visual_selection()
require("telescope-live-grep-args.shortcuts").grep_word_under_cursor()

After

require("telescope").extensions.live_grep_args.live_grep_args()
require("telescope").extensions.live_grep_args.shortcuts.grep_visual_selection()
require("telescope").extensions.live_grep_args.shortcuts.grep_word_under_cursor()

Type of change

Please delete options that are not relevant.

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

How Has This Been Tested?

  • Run or keymap shortcuts through extensions object:
    • ie) require("telescope").extensions.live_grep_args.shortcuts.grep_visual_selection()

Configuration:

  • Neovim version (nvim --version): 0.11.2
  • Operating system and version: MacOS 15.5

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)

@jesseleite
jesseleite marked this pull request as ready for review January 10, 2026 20:57
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.

1 participant