From a85b71bfc862753ee11ae5986d882bd9588b17a2 Mon Sep 17 00:00:00 2001 From: Takayuki Tsukitani Date: Wed, 19 Oct 2022 18:26:32 +0900 Subject: [PATCH] Fix default supported capabilities (#1379) * add missing supported capabilities * sort alphabetically * set `dynamicRegistration` to `v:false` for adding capabilities * add `prepareSupportDefaultBehavior` to `rename` capability --- autoload/lsp.vim | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/autoload/lsp.vim b/autoload/lsp.vim index 98f0b02a..de449ef1 100644 --- a/autoload/lsp.vim +++ b/autoload/lsp.vim @@ -484,6 +484,9 @@ function! lsp#default_get_supported_capabilities(server_info) abort " Sorted alphabetically return { \ 'textDocument': { + \ 'callHierarchy': { + \ 'dynamicRegistration': v:false, + \ }, \ 'codeAction': { \ 'dynamicRegistration': v:false, \ 'codeActionLiteralSupport': { @@ -548,12 +551,20 @@ function! lsp#default_get_supported_capabilities(server_info) abort \ 'dynamicRegistration': v:false, \ 'linkSupport' : v:true \ }, + \ 'publishDiagnostics': { + \ 'relatedInformation': v:true, + \ }, \ 'rangeFormatting': { \ 'dynamicRegistration': v:false, \ }, \ 'references': { \ 'dynamicRegistration': v:false, \ }, + \ 'rename': { + \ 'dynamicRegistration': v:false, + \ 'prepareSupport': v:true, + \ 'prepareSupportDefaultBehavior': 1 + \ }, \ 'semanticTokens': { \ 'dynamicRegistration': v:false, \ 'requests': { @@ -576,8 +587,11 @@ function! lsp#default_get_supported_capabilities(server_info) abort \ 'multilineTokenSupport': v:false, \ 'serverCancelSupport': v:false \ }, - \ 'publishDiagnostics': { - \ 'relatedInformation': v:true, + \ 'signatureHelp': { + \ 'dynamicRegistration': v:false, + \ }, + \ 'symbol': { + \ 'dynamicRegistration': v:false, \ }, \ 'synchronization': { \ 'didSave': v:true, @@ -585,13 +599,13 @@ function! lsp#default_get_supported_capabilities(server_info) abort \ 'willSave': v:false, \ 'willSaveWaitUntil': v:false, \ }, - \ 'typeHierarchy': { - \ 'dynamicRegistration': v:false - \ }, \ 'typeDefinition': { \ 'dynamicRegistration': v:false, \ 'linkSupport' : v:true \ }, + \ 'typeHierarchy': { + \ 'dynamicRegistration': v:false + \ }, \ }, \ 'window': { \ 'workDoneProgress': g:lsp_work_done_progress_enabled ? v:true : v:false,