Skip to content

Commit

Permalink
Treat window/progress messages as log messages
Browse files Browse the repository at this point in the history
These messages should only be displayed if `log_level` is set to
`'Log'`.
  • Loading branch information
gpanders committed Aug 3, 2020
1 parent 632d49b commit 8f82a02
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions autoload/lsc/server.vim
Original file line number Diff line number Diff line change
Expand Up @@ -325,13 +325,15 @@ function! s:Dispatch(server, method, params, id) abort
call lsc#util#shift(a:server.logs, 100,
\ {'message': a:params.message, 'type': a:params.type})
elseif a:method ==? 'window/progress'
if has_key(a:params, 'message')
let l:full = a:params['title'] . a:params['message']
call lsc#message#show('Progress ' . l:full)
elseif has_key(a:params, 'done')
call lsc#message#show('Finished ' . a:params['title'])
else
call lsc#message#show('Starting ' . a:params['title'])
if lsc#config#shouldEcho(a:server, 4)
if has_key(a:params, 'message')
let l:full = a:params['title'] . a:params['message']
call lsc#message#show('Progress ' . l:full)
elseif has_key(a:params, 'done')
call lsc#message#show('Finished ' . a:params['title'])
else
call lsc#message#show('Starting ' . a:params['title'])
endif
endif
elseif a:method ==? 'workspace/applyEdit'
let l:applied = lsc#edit#apply(a:params.edit)
Expand Down

0 comments on commit 8f82a02

Please sign in to comment.