diff options
author | Aleksey Kladov <[email protected]> | 2020-04-25 20:11:18 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2020-04-25 20:22:40 +0100 |
commit | 0ac5ed5a84799e52770cdd5edf0b8c099c3c0421 (patch) | |
tree | c19ebf30bebcbcf5cb567c243be048c75309807c /editors/code | |
parent | bd9ede0ec9fb76c8cc0b572ef0405811e1cb666e (diff) |
Remove dead code
Diffstat (limited to 'editors/code')
-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. |