Skip to content

Commit

Permalink
add window.workDoneProgress client capability (prabirshrestha#970)
Browse files Browse the repository at this point in the history
  • Loading branch information
prabirshrestha authored Dec 24, 2020
1 parent 3cdca33 commit 0c4e149
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
3 changes: 3 additions & 0 deletions autoload/lsp.vim
Original file line number Diff line number Diff line change
Expand Up @@ -532,6 +532,9 @@ function! lsp#default_get_supported_capabilities(server_info) abort
\ 'linkSupport' : v:true
\ },
\ },
\ 'window': {
\ 'workDoneProgress': g:lsp_work_done_progress_enabled ? v:true : v:false,
\ },
\ 'workspace': {
\ 'applyEdit': v:true,
\ 'configuration': v:true
Expand Down
9 changes: 9 additions & 0 deletions doc/vim-lsp.txt
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ CONTENTS *vim-lsp-contents*
g:lsp_completion_resolve_timeout |g:lsp_completion_resolve_timeout|
g:lsp_tagfunc_source_methods |g:lsp_tagfunc_source_methods|
g:lsp_show_message_request_enabled |g:lsp_show_message_request_enabled|
g:lsp_work_done_progress_enabled |g:lsp_work_done_progress_enabled|
Functions |vim-lsp-functions|
lsp#enable |lsp#enable()|
lsp#disable |lsp#disable()|
Expand Down Expand Up @@ -775,6 +776,14 @@ g:lsp_show_message_request_enabled *g:lsp_show_message_request_enabled*
Determines whether or not `window/showMessageRequest` should show message to
the user or if it should be ignored. Set to `1` to enable.

g:lsp_work_done_progress_enabled *g:lsp_work_done_progress_enabled*
Type: |Number|
Default: `0`

Determines whether or not to ask the server to send `$/progress`
notifications. This can be intercepted by listening to |lsp#stream()|.
Set to `1` to enable.

==============================================================================
FUNCTIONS *vim-lsp-functions*

Expand Down
1 change: 1 addition & 0 deletions plugin/lsp.vim
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ let g:lsp_text_document_did_save_delay = get(g:, 'lsp_text_document_did_save_del
let g:lsp_completion_resolve_timeout = get(g:, 'lsp_completion_resolve_timeout', 200)
let g:lsp_tagfunc_source_methods = get(g:, 'lsp_tagfunc_source_methods', ['definition', 'declaration', 'implementation', 'typeDefinition'])
let g:lsp_show_message_request_enabled = get(g:, 'lsp_show_message_request_enabled', 1)
let g:lsp_work_done_progress_enabled = get(g:, 'lsp_work_done_progress_enabled', 0)

let g:lsp_get_supported_capabilities = get(g:, 'lsp_get_supported_capabilities', [function('lsp#default_get_supported_capabilities')])

Expand Down

0 comments on commit 0c4e149

Please sign in to comment.