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

fix: execute autocmds correctly #2375

Merged
merged 1 commit into from
Feb 19, 2023

Conversation

josa42
Copy link
Contributor

@josa42 josa42 commented Feb 12, 2023

Description

I tried to use the User TelescopeFindPre event listed on the README, but the autocmd was never executed. This PR fixes that.

Autocmds are currently executed like this:

vim.api.nvim_exec_autocmds("User TelescopeKeymap", {})

And to my knowledge the pattern needs to be passed as an option:

vim.api.nvim_exec_autocmds("User", { pattern = "TelescopeKeymap" })

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

  1. Add a autocmd:
    autocmd User TelescopeFindPre echo "-> TelescopeFindPre!"
  2. Open telescope

It should print "-> TelescopeFindPre!".


Configuration:

  • Neovim version: v0.9.0-dev-912+gfe1e6b82f
  • Operating system and version: macOS 13.1

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)

@josa42 josa42 marked this pull request as ready for review February 12, 2023 13:21
@Conni2461
Copy link
Member

thanks :)

@Conni2461 Conni2461 merged commit e572c63 into nvim-telescope:master Feb 19, 2023
Conni2461 pushed a commit that referenced this pull request Feb 19, 2023
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.

2 participants