| 1 | package PLS::Server::Response::InitializeResult; | ||
| 2 | |||
| 3 | 13 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | 13 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | |||
| 6 | 13 | ▶ | use parent q(PLS::Server::Response); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 7 | |||
| 8 | 13 | ▶ | use PLS::JSON; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 9 | 13 | ▶ | use PLS::Server::State; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 10 | |||
| 11 | =head1 NAME | ||
| 12 | |||
| 13 | PLS::Server::Response::InitializeResult | ||
| 14 | |||
| 15 | =head1 DESCRIPTION | ||
| 16 | |||
| 17 | This is a message from the server to the client with the result | ||
| 18 | of initialization. | ||
| 19 | |||
| 20 | This message contains information about the server's capabilities. | ||
| 21 | |||
| 22 | =cut | ||
| 23 | |||
| 24 | sub new | ||
| 25 | 5 | ▶ | { |
|
Subroutine
new: called CC=1 SCAR=0.0
Pod
undocumented
| |||
| 26 | 5 | my ($class, $request) = @_; | |
| 27 | |||
| 28 | my %self = ( | ||
| 29 | id => $request->{id}, | ||
| 30 | 5 | result => { | |
| 31 | capabilities => { | ||
| 32 | completionItem => { | ||
| 33 | labelDetailsSupport => PLS::JSON::true | ||
| 34 | }, | ||
| 35 | definitionProvider => PLS::JSON::true, | ||
| 36 | documentSymbolProvider => PLS::JSON::true, | ||
| 37 | hoverProvider => PLS::JSON::true, | ||
| 38 | signatureHelpProvider => { | ||
| 39 | triggerCharacters => ['(', ','] | ||
| 40 | }, | ||
| 41 | textDocumentSync => { | ||
| 42 | openClose => PLS::JSON::true, | ||
| 43 | change => 2, | ||
| 44 | save => PLS::JSON::true, | ||
| 45 | }, | ||
| 46 | documentFormattingProvider => PLS::JSON::true, | ||
| 47 | documentRangeFormattingProvider => PLS::JSON::true, | ||
| 48 | completionProvider => { | ||
| 49 | triggerCharacters => ['>', ':', '$', '@', '%', ' ', '-'], | ||
| 50 | resolveProvider => PLS::JSON::true, | ||
| 51 | }, | ||
| 52 | executeCommandProvider => { | ||
| 53 | commands => ['pls.sortImports'] | ||
| 54 | }, | ||
| 55 | workspaceSymbolProvider => PLS::JSON::true, | ||
| 56 | workspace => { | ||
| 57 | workspaceFolders => { | ||
| 58 | supported => PLS::JSON::true, | ||
| 59 | changeNotifications => PLS::JSON::true | ||
| 60 | } | ||
| 61 | } | ||
| 62 | } | ||
| 63 | } | ||
| 64 | ); | ||
| 65 | |||
| 66 | 5 | return bless \%self, $class; | |
| 67 | } ## end sub new | ||
| 68 | |||
| 69 | sub serialize | ||
| 70 | 5 | ▶ | { |
|
Subroutine
serialize: called CC=1 SCAR=0.0
Pod
undocumented
| |||
| 71 | 5 | my ($self) = @_; | |
| 72 | |||
| 73 | 5 | $PLS::Server::State::INITIALIZED = 1; | |
| 74 | 5 | return $self->SUPER::serialize(); | |
| 75 | } ## end sub serialize | ||
| 76 | |||
| 77 | 13 | 1; | |