diff --git a/doc/cmp.txt b/doc/cmp.txt index 166287e..d71b866 100644 --- a/doc/cmp.txt +++ b/doc/cmp.txt @@ -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`. diff --git a/plugin/cmp.lua b/plugin/cmp.lua index 71b9014..ae4d4f6 100644 --- a/plugin/cmp.lua +++ b/plugin/cmp.lua @@ -126,7 +126,7 @@ end vim.cmd [[command! CmpStatus lua require('cmp').status()]] -vim.cmd [[doautocmd User cmp#ready]] +vim.cmd [[doautocmd User CmpReady]] if vim.on_key then vim.on_key(function(keys)