PLS/Server/Request/Initialized.pm

filter: Statementstmt 79.1% 19 / 24 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 85.7% 6 / 7 Podpod 0.0% 0 / 1 totaltotal 78.1% 25 / 32 CC 1 SCAR 1.3
CC
1
Cov
79%
service
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.1
« PLS/Server/Request/TextDocument/DidOpen.pm ↑ Summary PLS/Server/Request/TextDocument/DidSave.pm »
1 package PLS::Server::Request::Initialized;
2  
3 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 1 ▶use parent 'PLS::Server::Request';
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 1 ▶use PLS::Server::State;
Subroutine BEGIN: called CC=1 SCAR=0.0
9 1 ▶use PLS::Server::Request::Workspace::Configuration;
Subroutine BEGIN: called CC=1 SCAR=0.0
10 1 ▶use PLS::Server::Request::Client::RegisterCapability;
Subroutine BEGIN: called CC=1 SCAR=0.0
11  
12 =head1 NAME
13  
14 PLS::Server::Request::Initialized
15  
16 =head1 DESCRIPTION
17  
18 This is a request from the client to the server indicating that it received
19 the result of the initialize request from the server.
20  
21 The server sends back some initial requests that it needs to complete initialization.
22  
23 =cut
24  
25 sub service
26 {
27 0 ▶ my ($self, $server) = @_;
Subroutine service: not called CC=1 SCAR=6.9
Pod undocumented
28  
29 # now that we're initialized, put in a request for our configuration items.
30 0 $server->{server_requests}->put(PLS::Server::Request::Workspace::Configuration->new);
31  
32 # also start watching all files
33 $server->{server_requests}->put(
34 0 PLS::Server::Request::Client::RegisterCapability->new(
35 [
36 {
37 id => 'did-change-watched-files',
38 method => 'workspace/didChangeWatchedFiles',
39 registerOptions => {
40 watchers => [
41 {
42 globPattern => '**/*'
43 }
44 ]
45 }
46 },
47 {
48 id => 'did-change-configuration',
49 method => 'workspace/didChangeConfiguration'
50 }
51 ]
52 )
53 );
54  
55 0 $PLS::Server::State::INITIALIZED = 1;
56 0 return;
57 } ## end sub service
58  
59 1 1;
« PLS/Server/Request/TextDocument/DidOpen.pm ↑ Summary PLS/Server/Request/TextDocument/DidSave.pm »