diff options
Diffstat (limited to 'editors/code/src')
-rw-r--r-- | editors/code/src/client.ts | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/editors/code/src/client.ts b/editors/code/src/client.ts index 0ad4b63ae..f702829cd 100644 --- a/editors/code/src/client.ts +++ b/editors/code/src/client.ts | |||
@@ -42,35 +42,6 @@ export async function createClient(serverPath: string, cwd: string): Promise<lc. | |||
42 | clientOptions, | 42 | clientOptions, |
43 | ); | 43 | ); |
44 | 44 | ||
45 | // HACK: This is an awful way of filtering out the decorations notifications | ||
46 | // However, pending proper support, this is the most effecitve approach | ||
47 | // Proper support for this would entail a change to vscode-languageclient to allow not notifying on certain messages | ||
48 | // Or the ability to disable the serverside component of highlighting (but this means that to do tracing we need to disable hihlighting) | ||
49 | // This also requires considering our settings strategy, which is work which needs doing | ||
50 | // @ts-ignore The tracer is private to vscode-languageclient, but we need access to it to not log publishDecorations requests | ||
51 | res._tracer = { | ||
52 | log: (messageOrDataObject: string | unknown, data?: string) => { | ||
53 | if (typeof messageOrDataObject === 'string') { | ||
54 | if ( | ||
55 | messageOrDataObject.includes( | ||
56 | 'rust-analyzer/publishDecorations', | ||
57 | ) || | ||
58 | messageOrDataObject.includes( | ||
59 | 'rust-analyzer/decorationsRequest', | ||
60 | ) | ||
61 | ) { | ||
62 | // Don't log publish decorations requests | ||
63 | } else { | ||
64 | // @ts-ignore This is just a utility function | ||
65 | res.logTrace(messageOrDataObject, data); | ||
66 | } | ||
67 | } else { | ||
68 | // @ts-ignore | ||
69 | res.logObjectTrace(messageOrDataObject); | ||
70 | } | ||
71 | }, | ||
72 | }; | ||
73 | |||
74 | // To turn on all proposed features use: res.registerProposedFeatures(); | 45 | // To turn on all proposed features use: res.registerProposedFeatures(); |
75 | // Here we want to enable CallHierarchyFeature and SemanticTokensFeature | 46 | // Here we want to enable CallHierarchyFeature and SemanticTokensFeature |
76 | // since they are available on stable. | 47 | // since they are available on stable. |