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

Add ClapOnInitialize hook #653

Merged
merged 4 commits into from
Mar 11, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

### Added

- Add user autocmd `ClapOnInitialize`, can be used to ignore some buffers when opening clap. #653
- Add `g:clap_provider_colors_ignore_default` to ignore the default colors in `VIMRUNTIME`. #632
- Support neovim floating_win based action menu. #655

Expand Down
2 changes: 2 additions & 0 deletions autoload/clap.vim
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,8 @@ function! clap#for(provider_id_or_alias) abort

call clap#selection#init()

silent doautocmd <nomodeline> User ClapOnInitialize

" This flag is used to slience the autocmd events for NeoVim, e.g., on_typed.
" Vim doesn't have these issues as it uses noautocmd in most cases.
"
Expand Down
7 changes: 7 additions & 0 deletions doc/clap.txt
Original file line number Diff line number Diff line change
Expand Up @@ -949,6 +949,13 @@ g:clap.display *g:clap.display*
the buffer number specified to the display buffer.


ClapOnInitialize *ClapOnInitialize-autocmd*
*ClapOnInitialize*

This |User| autocommand is triggered after the initialization is done.
Useful for not opening clap window in some special buffers like nerdtree.


ClapOnEnter *ClapOnEnter-autocmd*
*ClapOnEnter*

Expand Down