Skip to content

Commit a85b71b

Browse files
authored
Fix default supported capabilities (#1379)
* add missing supported capabilities * sort alphabetically * set `dynamicRegistration` to `v:false` for adding capabilities * add `prepareSupportDefaultBehavior` to `rename` capability
1 parent 2bb97d2 commit a85b71b

File tree

1 file changed

+19
-5
lines changed

1 file changed

+19
-5
lines changed

autoload/lsp.vim

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -484,6 +484,9 @@ function! lsp#default_get_supported_capabilities(server_info) abort
484484
" Sorted alphabetically
485485
return {
486486
\ 'textDocument': {
487+
\ 'callHierarchy': {
488+
\ 'dynamicRegistration': v:false,
489+
\ },
487490
\ 'codeAction': {
488491
\ 'dynamicRegistration': v:false,
489492
\ 'codeActionLiteralSupport': {
@@ -548,12 +551,20 @@ function! lsp#default_get_supported_capabilities(server_info) abort
548551
\ 'dynamicRegistration': v:false,
549552
\ 'linkSupport' : v:true
550553
\ },
554+
\ 'publishDiagnostics': {
555+
\ 'relatedInformation': v:true,
556+
\ },
551557
\ 'rangeFormatting': {
552558
\ 'dynamicRegistration': v:false,
553559
\ },
554560
\ 'references': {
555561
\ 'dynamicRegistration': v:false,
556562
\ },
563+
\ 'rename': {
564+
\ 'dynamicRegistration': v:false,
565+
\ 'prepareSupport': v:true,
566+
\ 'prepareSupportDefaultBehavior': 1
567+
\ },
557568
\ 'semanticTokens': {
558569
\ 'dynamicRegistration': v:false,
559570
\ 'requests': {
@@ -576,22 +587,25 @@ function! lsp#default_get_supported_capabilities(server_info) abort
576587
\ 'multilineTokenSupport': v:false,
577588
\ 'serverCancelSupport': v:false
578589
\ },
579-
\ 'publishDiagnostics': {
580-
\ 'relatedInformation': v:true,
590+
\ 'signatureHelp': {
591+
\ 'dynamicRegistration': v:false,
592+
\ },
593+
\ 'symbol': {
594+
\ 'dynamicRegistration': v:false,
581595
\ },
582596
\ 'synchronization': {
583597
\ 'didSave': v:true,
584598
\ 'dynamicRegistration': v:false,
585599
\ 'willSave': v:false,
586600
\ 'willSaveWaitUntil': v:false,
587601
\ },
588-
\ 'typeHierarchy': {
589-
\ 'dynamicRegistration': v:false
590-
\ },
591602
\ 'typeDefinition': {
592603
\ 'dynamicRegistration': v:false,
593604
\ 'linkSupport' : v:true
594605
\ },
606+
\ 'typeHierarchy': {
607+
\ 'dynamicRegistration': v:false
608+
\ },
595609
\ },
596610
\ 'window': {
597611
\ 'workDoneProgress': g:lsp_work_done_progress_enabled ? v:true : v:false,

0 commit comments

Comments
 (0)