Skip to content

feat: check if cmd extension can be loaded#2655

Merged
Conni2461 merged 1 commit into
nvim-telescope:masterfrom
willothy:master
Sep 10, 2023
Merged

feat: check if cmd extension can be loaded#2655
Conni2461 merged 1 commit into
nvim-telescope:masterfrom
willothy:master

Conversation

@willothy

Copy link
Copy Markdown
Contributor

Description

As a last resort if no other cmd is found in run_cmd, check if the command can be loaded as an extension.

I know pcall is a bit hacky, but not needing to load every extension on startup is nice.

Type of change

Please delete options that are not relevant.

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

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list relevant details about your configuration

Install extension telescope-frecency, but don't load it with load_extension. Then, run :Telescope frecency. Before this change, this would error. Now, the command runs as expected.

As a last resort if no other cmd is found in `run_cmd`, check
if the command can be loaded as an extension.
@Conni2461

Copy link
Copy Markdown
Member

thanks LGTM :)

@Conni2461 Conni2461 merged commit a197706 into nvim-telescope:master Sep 10, 2023
rameshsanth pushed a commit to rameshsanth/telescope.nvim that referenced this pull request Nov 17, 2023
As a last resort if no other cmd is found in `run_cmd`, check
if the command can be loaded as an extension.
Conni2461 pushed a commit that referenced this pull request Nov 28, 2023
…sions (#2655)

As a last resort if no other cmd is found in `run_cmd`, check
if the command can be loaded as an extension.

(cherry picked from commit a197706)
delphinus added a commit to delphinus/possession.nvim that referenced this pull request Jul 16, 2024
With this patch, you can call `:Telescope possession` when you have not
called `telescope.load_extension()` before.

See nvim-telescope/telescope.nvim#2655

NOTE: You still need to call `load_extension()` for calling
`telescope.extensions.possession.list()` / `.possession().
delphinus added a commit to delphinus/possession.nvim that referenced this pull request Jul 16, 2024
With this patch, you can call `:Telescope possession` when you have not
called `telescope.load_extension()` before.

See nvim-telescope/telescope.nvim#2655

NOTE: You still need to call `load_extension()` for calling
`telescope.extensions.possession.list()` / `.possession()`.
jedrzejboczar pushed a commit to jedrzejboczar/possession.nvim that referenced this pull request Jul 22, 2024
With this patch, you can call `:Telescope possession` when you have not
called `telescope.load_extension()` before.

See nvim-telescope/telescope.nvim#2655

NOTE: You still need to call `load_extension()` for calling
`telescope.extensions.possession.list()` / `.possession()`.
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