We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bf295fa commit 4c9a22cCopy full SHA for 4c9a22c
src/lsp.ts
@@ -42,5 +42,13 @@ export function inverse_namespace(namespace: object): Record<number, string> {
42
return records;
43
}
44
45
+/**
46
+ * Why programmatic solution rather than hard-coding the namespace the other way around?
47
+ * Because the namespaces are copy-paste from the LSP specification, and it will be easier
48
+ * to maintain this way in the future.
49
+ *
50
+ * Why not simply import from lsProtocol?
51
+ * Because this triggers some strange webpack issue as an additional package would need to be included.
52
+ */
53
export const diagnosticSeverityNames = inverse_namespace(DiagnosticSeverity);
54
export const completionItemKindNames = inverse_namespace(CompletionItemKind);
0 commit comments