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

Allow to pass options to shortcuts / Add shortcuts to grep in current file only #82

Merged
merged 2 commits into from
Jun 9, 2024

Conversation

LLMChild
Copy link

@LLMChild LLMChild commented Jun 6, 2024

Description

Make shortcuts can pass option too.
Add some example of searching in current buffer using current work or visual selection

Fixes # (issue)

Type of change

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

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)

@weeman1337 weeman1337 changed the title make shortcuts can pass opt Allow to pass options to shortcuts / Add shortcuts to grep in current file only Jun 9, 2024
Also add the grep_word_visual_selection_current_buffer and
grep_word_under_cursor_current_buffer shortcuts.
@weeman1337
Copy link
Collaborator

Thanks for your contribution @LLMChild !

I've fixed the code style and remove of unpack. Also updated the README. Otherwise looks good to me 👍

@weeman1337 weeman1337 merged commit ef3c499 into nvim-telescope:master Jun 9, 2024
2 checks passed
Copy link
Author

@LLMChild LLMChild left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wrong name for visual grep short cut

| `grep_visual_selection` | Start live grep with visual selection | see `grep_word_under_cursor` |
| `grep_word_visual_selection_current_buffer` | Same as `grep_visual_selection` but for the file of the current buffer | |
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a little bit of confusing using grep_word_visual_selection_current_buffer as fucntion name.
It should be grep_visual_selection_current_buffer

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.

3 participants