diff --git a/README.md b/README.md index 0b490b4..393367c 100644 --- a/README.md +++ b/README.md @@ -520,6 +520,15 @@ Telescope find_files theme=get_dropdown Themes should work with every `telescope.builtin` function. If you wish to make theme, check out `lua/telescope/themes.lua`. +## Autocmds + +Telescope user autocmds: + +| Event | Description | +|---------------------------------|----------------------------------------------------| +| `User TelescopeFindPre` | Do it before create Telescope all the float window | +| `User TelescopePreviewerLoaded` | Do it after Telescope previewer window create | + ## Extensions diff --git a/lua/telescope/pickers.lua b/lua/telescope/pickers.lua index 403371f..2a42f3c 100644 --- a/lua/telescope/pickers.lua +++ b/lua/telescope/pickers.lua @@ -326,6 +326,9 @@ function Picker:find() self.original_win_id = a.nvim_get_current_win() + -- User autocmd run it before create Telescope window + vim.cmd'do User TelescopeFindPre' + -- Create three windows: -- 1. Prompt window -- 2. Options window