Change cmp#ready to CmpReady and document autocmds better (#669)

This commit is contained in:
0x74696d6d79
2021-12-26 00:57:15 -05:00
committed by GitHub
parent 4a19645374
commit ae708ef3a4
2 changed files with 6 additions and 3 deletions

View File

@@ -325,8 +325,11 @@ Highlight *cmp-highlight*
==============================================================================
Autocmd *cmp-autocmd*
*cmp#ready*
Invoke after sourcing the `plugin/cmp.lua`
You can create custom autocommands for certain nvim-cmp events by defining
autocommands for the User event with the following patterns.
*CmpReady*
Invoked when nvim-cmp gets sourced from `plugin/cmp.lua`.

View File

@@ -126,7 +126,7 @@ end
vim.cmd [[command! CmpStatus lua require('cmp').status()]]
vim.cmd [[doautocmd <nomodeline> User cmp#ready]]
vim.cmd [[doautocmd <nomodeline> User CmpReady]]
if vim.on_key then
vim.on_key(function(keys)