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: allow for lazy loading telescope with notify #25

Merged
merged 1 commit into from
Oct 12, 2021
Merged

fix: allow for lazy loading telescope with notify #25

merged 1 commit into from
Oct 12, 2021

Conversation

brphilly
Copy link
Contributor

@brphilly brphilly commented Oct 12, 2021

Some users may only load telescope when require("telescope") is first executed (using packer's module key), so avoid doing this in notify setup otherwise loading notify will also load telescope.

Also recommend :Telescope notify notify rather than :Telescope notify since the former will work even if telescope is loaded after notify and require("telescope").load_extension("notify") hasn't been run.

Edit: Forgot to mention that g:loaded_telescope is defined here
https://github.com/nvim-telescope/telescope.nvim/blob/3f45d64e9c47ad9eef273ddab65790a84cced30b/plugin/telescope.vim#L6-L9

@rcarriga
Copy link
Owner

Hey thanks for the PR! 😄

I'm not a fan of the Telescope notify notify, it's not as easy to use and shouldn't be the recommended way to compensate for a niche quirk. Instead let's add a note below to say something about calling require("telescope").load_extension("notify") manually if telescope is lazy loaded

Some users may only load telescope when require("telescope") is first
executed, so don't do this to avoid prematurely loading telescope.
@brphilly
Copy link
Contributor Author

Ok I've made the requested changes. Let me know what you think.

@rcarriga
Copy link
Owner

Perfect! Thanks again 😁

@rcarriga rcarriga merged commit 4743b32 into rcarriga:master Oct 12, 2021
@brphilly brphilly deleted the fix/telescope-lazy-load branch October 12, 2021 19:32
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