File tree Expand file tree Collapse file tree 4 files changed +51
-8
lines changed
Expand file tree Collapse file tree 4 files changed +51
-8
lines changed Original file line number Diff line number Diff line change @@ -297,12 +297,9 @@ PLSAbstractServer >> serverShutdown [
297297
298298{ #category : ' lsp - trace' }
299299PLSAbstractServer >> setTrace: setTraceParam [
300- < jrpc: #' $/setTrace' >
301- ]
302300
303- { #category : ' lsp - trace' }
304- PLSAbstractServer >> setTraceNotification: value [
305- < jrpc: #' $/setTraceNotification' >
301+ < jrpc: #' $/setTrace' >
302+ self context traceValue: (setTraceParam at: #value )
306303]
307304
308305{ #category : ' lsp - show document' }
Original file line number Diff line number Diff line change 11"
2- The server use me to store informations such as the text item
2+ The server use me to store informations such as the text item.
3+
4+ - `traceValue` represent the level of trace sent to the client
35"
46Class {
57 #name : ' PLSContext' ,
810 ' textItems' ,
911 ' messageProcesses' ,
1012 ' clientContext' ,
11- ' server'
13+ ' server' ,
14+ ' traceValue'
1215 ],
1316 #category : ' PharoLanguageServer-Context' ,
1417 #package : ' PharoLanguageServer' ,
@@ -37,8 +40,10 @@ PLSContext >> clientContext: anObject [
3740
3841{ #category : ' initialization' }
3942PLSContext >> initialize [
43+
4044 textItems := Dictionary new .
41- messageProcesses := Dictionary new
45+ messageProcesses := Dictionary new .
46+ traceValue := PLSTraceValue messages
4247]
4348
4449{ #category : ' message processing' }
@@ -106,3 +111,15 @@ PLSContext >> textItems [
106111PLSContext >> textItems: anObject [
107112 textItems := anObject
108113]
114+
115+ { #category : ' accessing' }
116+ PLSContext >> traceValue [
117+
118+ ^ traceValue
119+ ]
120+
121+ { #category : ' accessing' }
122+ PLSContext >> traceValue: anObject [
123+
124+ traceValue := anObject
125+ ]
Original file line number Diff line number Diff line change @@ -264,6 +264,7 @@ PLSServer >> onInitializeTrace: trace processId: processId locale: locale client
264264 capabilities: (PLPClientCapabilities from: capabilities);
265265 rootUri: rootUri;
266266 yourself ).
267+ trace ifNotNil: [ self context traceValue: trace ].
267268 ^ PLSInitializeResult new
268269]
269270
Original file line number Diff line number Diff line change 1+ "
2+ [https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#traceValue](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#traceValue)
3+ "
4+ Class {
5+ #name : ' PLSTraceValue' ,
6+ #superclass : ' Object' ,
7+ #category : ' PharoLanguageServer-Structure-Trace' ,
8+ #package : ' PharoLanguageServer' ,
9+ #tag : ' Structure-Trace'
10+ }
11+
12+ { #category : ' as yet unclassified' }
13+ PLSTraceValue class >> messages [
14+
15+ ^ ' messages'
16+ ]
17+
18+ { #category : ' as yet unclassified' }
19+ PLSTraceValue class >> off [
20+
21+ ^ ' off'
22+ ]
23+
24+ { #category : ' as yet unclassified' }
25+ PLSTraceValue class >> verbose [
26+
27+ ^ ' verbose'
28+ ]
You can’t perform that action at this time.
0 commit comments