line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package PLS::Server::Method::TextDocument; |
2
|
|
|
|
|
|
|
|
3
|
9
|
|
|
9
|
|
63
|
use strict; |
|
9
|
|
|
|
|
10
|
|
|
9
|
|
|
|
|
244
|
|
4
|
9
|
|
|
9
|
|
44
|
use warnings; |
|
9
|
|
|
|
|
18
|
|
|
9
|
|
|
|
|
189
|
|
5
|
|
|
|
|
|
|
|
6
|
9
|
|
|
9
|
|
3244
|
use PLS::Server::Request::TextDocument::Completion; |
|
9
|
|
|
|
|
18
|
|
|
9
|
|
|
|
|
263
|
|
7
|
9
|
|
|
9
|
|
3212
|
use PLS::Server::Request::TextDocument::Definition; |
|
9
|
|
|
|
|
18
|
|
|
9
|
|
|
|
|
242
|
|
8
|
9
|
|
|
9
|
|
3090
|
use PLS::Server::Request::TextDocument::DidChange; |
|
9
|
|
|
|
|
159
|
|
|
9
|
|
|
|
|
1473
|
|
9
|
9
|
|
|
9
|
|
8528
|
use PLS::Server::Request::TextDocument::DidClose; |
|
9
|
|
|
|
|
75
|
|
|
9
|
|
|
|
|
368
|
|
10
|
9
|
|
|
9
|
|
3530
|
use PLS::Server::Request::TextDocument::DidOpen; |
|
9
|
|
|
|
|
41
|
|
|
9
|
|
|
|
|
529
|
|
11
|
9
|
|
|
9
|
|
3391
|
use PLS::Server::Request::TextDocument::DidSave; |
|
9
|
|
|
|
|
27
|
|
|
9
|
|
|
|
|
381
|
|
12
|
9
|
|
|
9
|
|
3430
|
use PLS::Server::Request::TextDocument::DocumentSymbol; |
|
9
|
|
|
|
|
26
|
|
|
9
|
|
|
|
|
260
|
|
13
|
9
|
|
|
9
|
|
3254
|
use PLS::Server::Request::TextDocument::Formatting; |
|
9
|
|
|
|
|
276
|
|
|
9
|
|
|
|
|
1550
|
|
14
|
9
|
|
|
9
|
|
8322
|
use PLS::Server::Request::TextDocument::Hover; |
|
9
|
|
|
|
|
25
|
|
|
9
|
|
|
|
|
263
|
|
15
|
9
|
|
|
9
|
|
3421
|
use PLS::Server::Request::TextDocument::SignatureHelp; |
|
9
|
|
|
|
|
35
|
|
|
9
|
|
|
|
|
332
|
|
16
|
9
|
|
|
9
|
|
3309
|
use PLS::Server::Request::TextDocument::RangeFormatting; |
|
9
|
|
|
|
|
215
|
|
|
9
|
|
|
|
|
4292
|
|
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
=head1 NAME |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
PLS::Server::Method::Workspace |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
=head1 DESCRIPTION |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
This module redirects requests starting with C<textDocument/> to the appropriate |
25
|
|
|
|
|
|
|
subclass of L<PLS::Server::Request> for the type of request. |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
Requests currently implemented: |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
=over |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
=item textDocument/definition - L<https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocument_definition> |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
L<PLS::Server::Request::TextDocument::Definition> |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
=item textDocument/documentSymbol - L<https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocument_documentSymbol> |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
L<PLS::Server::Request::TextDocument::DocumentSymbol> |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
=item textDocument/hover - L<https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocument_hover> |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
L<PLS::Server::Request::TextDocument::Hover> |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
=item textDocument/signatureHelp - L<https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocument_signatureHelp> |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
L<PLS::Server::Request::TextDocument::SignatureHelp> |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
=item textDocument/didOpen - L<https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocument_didOpen> |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
L<PLS::Server::Request::TextDocument::DidOpen> |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
=item textDocument/didChange - L<https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocument_didChange> |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
L<PLS::Server::Request::TextDocument::DidChange> |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
=item textDocument/didClose - L<https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocument_didClose> |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
L<PLS::Server::Request::TextDocument::DidClose> |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
=item textDocument/didSave - L<https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocument_didSave> |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
L<PLS::Server::Request::TextDocument::DidSave> |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
=item textDocument/formatting - L<https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocument_formatting> |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
L<PLS::Server::Request::TextDocument::Formatting> |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
=item textDocument/rangeFormatting - L<https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocument_rangeFormatting> |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
L<PLS::Server::Request::TextDocument::RangeFormatting> |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
=item textDocument/completion - L<https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocument_completion> |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
L<PLS::Server::Request::TextDocument::Completion> |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
=back |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
=cut |
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
sub get_request |
80
|
|
|
|
|
|
|
{ |
81
|
3
|
|
|
3
|
0
|
9
|
my ($request) = @_; |
82
|
|
|
|
|
|
|
|
83
|
3
|
|
|
|
|
14
|
my (undef, $method) = split '/', $request->{method}; |
84
|
|
|
|
|
|
|
|
85
|
3
|
50
|
|
|
|
13
|
if ($method eq 'definition') |
86
|
|
|
|
|
|
|
{ |
87
|
0
|
|
|
|
|
0
|
return PLS::Server::Request::TextDocument::Definition->new($request); |
88
|
|
|
|
|
|
|
} |
89
|
3
|
50
|
|
|
|
11
|
if ($method eq 'documentSymbol') |
90
|
|
|
|
|
|
|
{ |
91
|
0
|
|
|
|
|
0
|
return PLS::Server::Request::TextDocument::DocumentSymbol->new($request); |
92
|
|
|
|
|
|
|
} |
93
|
3
|
50
|
|
|
|
9
|
if ($method eq 'hover') |
94
|
|
|
|
|
|
|
{ |
95
|
0
|
|
|
|
|
0
|
return PLS::Server::Request::TextDocument::Hover->new($request); |
96
|
|
|
|
|
|
|
} |
97
|
3
|
50
|
|
|
|
9
|
if ($method eq 'signatureHelp') |
98
|
|
|
|
|
|
|
{ |
99
|
0
|
|
|
|
|
0
|
return PLS::Server::Request::TextDocument::SignatureHelp->new($request); |
100
|
|
|
|
|
|
|
} |
101
|
3
|
100
|
|
|
|
13
|
if ($method eq 'didOpen') |
102
|
|
|
|
|
|
|
{ |
103
|
2
|
|
|
|
|
90
|
return PLS::Server::Request::TextDocument::DidOpen->new($request); |
104
|
|
|
|
|
|
|
} |
105
|
1
|
50
|
|
|
|
7
|
if ($method eq 'didChange') |
106
|
|
|
|
|
|
|
{ |
107
|
0
|
|
|
|
|
0
|
return PLS::Server::Request::TextDocument::DidChange->new($request); |
108
|
|
|
|
|
|
|
} |
109
|
1
|
50
|
|
|
|
11
|
if ($method eq 'didClose') |
110
|
|
|
|
|
|
|
{ |
111
|
0
|
|
|
|
|
0
|
return PLS::Server::Request::TextDocument::DidClose->new($request); |
112
|
|
|
|
|
|
|
} |
113
|
1
|
50
|
|
|
|
9
|
if ($method eq 'didSave') |
114
|
|
|
|
|
|
|
{ |
115
|
0
|
|
|
|
|
0
|
return PLS::Server::Request::TextDocument::DidSave->new($request); |
116
|
|
|
|
|
|
|
} |
117
|
1
|
50
|
|
|
|
11
|
if ($method eq 'formatting') |
118
|
|
|
|
|
|
|
{ |
119
|
1
|
|
|
|
|
61
|
return PLS::Server::Request::TextDocument::Formatting->new($request); |
120
|
|
|
|
|
|
|
} |
121
|
0
|
0
|
|
|
|
|
if ($method eq 'rangeFormatting') |
122
|
|
|
|
|
|
|
{ |
123
|
0
|
|
|
|
|
|
return PLS::Server::Request::TextDocument::RangeFormatting->new($request); |
124
|
|
|
|
|
|
|
} |
125
|
0
|
0
|
|
|
|
|
if ($method eq 'completion') |
126
|
|
|
|
|
|
|
{ |
127
|
0
|
|
|
|
|
|
return PLS::Server::Request::TextDocument::Completion->new($request); |
128
|
|
|
|
|
|
|
} |
129
|
|
|
|
|
|
|
} ## end sub get_request |
130
|
|
|
|
|
|
|
|
131
|
|
|
|
|
|
|
1; |