Skip to content

Commit

Permalink
Change g:echodoc#events default value.
Browse files Browse the repository at this point in the history
CompleteChanged event affect performance
  • Loading branch information
Shougo committed Nov 26, 2021
1 parent a556899 commit 42b7fb4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
7 changes: 4 additions & 3 deletions autoload/echodoc.vim
Expand Up @@ -33,8 +33,7 @@ let g:echodoc#highlight_arguments = get(g:,
let g:echodoc#highlight_trailing = get(g:,
\ 'echodoc#highlight_trailing', 'Type')
let g:echodoc#events = get(g:,
\ 'echodoc#events',
\ ['CompleteDone', 'TextChangedP', 'CompleteChanged'])
\ 'echodoc#events', ['CompleteDone', 'TextChangedP'])

function! echodoc#enable() abort
if echodoc#is_echo() && &showmode && &cmdheight < 2
Expand All @@ -49,12 +48,14 @@ function! echodoc#enable() abort
autocmd InsertEnter * call s:on_event('InsertEnter')
autocmd CursorMovedI * call s:on_event('CursorMovedI')
autocmd InsertLeave * call s:clear_documentation()
autocmd User PumCompleteChanged call s:on_event('PumCompleteChanged')
augroup END
for event in g:echodoc#events
if exists('##' . event)
execute printf('autocmd echodoc %s * call s:on_event("%s")',
\ event, event)
elseif exists('##User#' . event)
execute printf('autocmd echodoc User %s * call s:on_event("%s")',
\ event, event)
endif
endfor
let s:is_enabled = 1
Expand Down
6 changes: 4 additions & 2 deletions doc/echodoc.txt
Expand Up @@ -60,7 +60,7 @@ g:echodoc#enable_at_startup *g:echodoc#enable_at_startup*
g:echodoc#events *g:echodoc#events*
If the |autocmd-events| are fired, echodoc is enabled.

Default: ['CompleteDone', 'TextChangedP', 'CompleteChanged']
Default: ['CompleteDone', 'TextChangedP']

*g:echodoc#highlight_identifier*
g:echodoc#highlight_identifier
Expand Down Expand Up @@ -213,7 +213,9 @@ Option 5:
==============================================================================
COMPATIBILITY *echodoc-compatibility*

* Remove "EchoDocEnable" and "EchoDocDisable" commands.
2021.11.16

* Change g:echodoc#events default value.

==============================================================================
vim:tw=78:ts=8:ft=help:norl:noet:fen:

0 comments on commit 42b7fb4

Please sign in to comment.