@difizen/libro-lsp 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (104) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +0 -0
  3. package/es/adapters/adapter.d.ts +255 -0
  4. package/es/adapters/adapter.d.ts.map +1 -0
  5. package/es/adapters/adapter.js +647 -0
  6. package/es/adapters/notebook-adapter.d.ts +150 -0
  7. package/es/adapters/notebook-adapter.d.ts.map +1 -0
  8. package/es/adapters/notebook-adapter.js +588 -0
  9. package/es/adapters/status-message.d.ts +48 -0
  10. package/es/adapters/status-message.d.ts.map +1 -0
  11. package/es/adapters/status-message.js +110 -0
  12. package/es/connection-manager.d.ts +199 -0
  13. package/es/connection-manager.d.ts.map +1 -0
  14. package/es/connection-manager.js +685 -0
  15. package/es/connection.d.ts +149 -0
  16. package/es/connection.d.ts.map +1 -0
  17. package/es/connection.js +591 -0
  18. package/es/extractors/index.d.ts +4 -0
  19. package/es/extractors/index.d.ts.map +1 -0
  20. package/es/extractors/index.js +6 -0
  21. package/es/extractors/manager.d.ts +31 -0
  22. package/es/extractors/manager.d.ts.map +1 -0
  23. package/es/extractors/manager.js +90 -0
  24. package/es/extractors/text-extractor.d.ts +56 -0
  25. package/es/extractors/text-extractor.d.ts.map +1 -0
  26. package/es/extractors/text-extractor.js +72 -0
  27. package/es/extractors/types.d.ts +68 -0
  28. package/es/extractors/types.d.ts.map +1 -0
  29. package/es/extractors/types.js +1 -0
  30. package/es/feature.d.ts +29 -0
  31. package/es/feature.d.ts.map +1 -0
  32. package/es/feature.js +85 -0
  33. package/es/index.d.ts +19 -0
  34. package/es/index.d.ts.map +1 -0
  35. package/es/index.js +21 -0
  36. package/es/lsp-app-contribution.d.ts +19 -0
  37. package/es/lsp-app-contribution.d.ts.map +1 -0
  38. package/es/lsp-app-contribution.js +155 -0
  39. package/es/lsp-protocol.d.ts +10 -0
  40. package/es/lsp-protocol.d.ts.map +1 -0
  41. package/es/lsp-protocol.js +1 -0
  42. package/es/lsp.d.ts +136 -0
  43. package/es/lsp.d.ts.map +1 -0
  44. package/es/lsp.js +141 -0
  45. package/es/manager.d.ts +142 -0
  46. package/es/manager.d.ts.map +1 -0
  47. package/es/manager.js +423 -0
  48. package/es/module.d.ts +3 -0
  49. package/es/module.d.ts.map +1 -0
  50. package/es/module.js +21 -0
  51. package/es/plugin.d.ts +56 -0
  52. package/es/plugin.d.ts.map +1 -0
  53. package/es/plugin.js +0 -0
  54. package/es/positioning.d.ts +66 -0
  55. package/es/positioning.d.ts.map +1 -0
  56. package/es/positioning.js +96 -0
  57. package/es/schema.d.ts +240 -0
  58. package/es/schema.d.ts.map +1 -0
  59. package/es/schema.js +0 -0
  60. package/es/tokens.d.ts +677 -0
  61. package/es/tokens.d.ts.map +1 -0
  62. package/es/tokens.js +183 -0
  63. package/es/utils.d.ts +33 -0
  64. package/es/utils.d.ts.map +1 -0
  65. package/es/utils.js +168 -0
  66. package/es/virtual/document.d.ts +546 -0
  67. package/es/virtual/document.d.ts.map +1 -0
  68. package/es/virtual/document.js +1263 -0
  69. package/es/ws-connection/server-capability-registration.d.ts +19 -0
  70. package/es/ws-connection/server-capability-registration.d.ts.map +1 -0
  71. package/es/ws-connection/server-capability-registration.js +51 -0
  72. package/es/ws-connection/types.d.ts +76 -0
  73. package/es/ws-connection/types.d.ts.map +1 -0
  74. package/es/ws-connection/types.js +1 -0
  75. package/es/ws-connection/ws-connection.d.ts +105 -0
  76. package/es/ws-connection/ws-connection.d.ts.map +1 -0
  77. package/es/ws-connection/ws-connection.js +301 -0
  78. package/package.json +67 -0
  79. package/src/adapters/adapter.ts +611 -0
  80. package/src/adapters/notebook-adapter.ts +463 -0
  81. package/src/adapters/status-message.ts +93 -0
  82. package/src/connection-manager.ts +626 -0
  83. package/src/connection.ts +570 -0
  84. package/src/extractors/index.ts +6 -0
  85. package/src/extractors/manager.ts +82 -0
  86. package/src/extractors/text-extractor.ts +94 -0
  87. package/src/extractors/types.ts +78 -0
  88. package/src/feature.ts +60 -0
  89. package/src/index.spec.ts +10 -0
  90. package/src/index.ts +21 -0
  91. package/src/lsp-app-contribution.ts +83 -0
  92. package/src/lsp-protocol.ts +10 -0
  93. package/src/lsp.ts +160 -0
  94. package/src/manager.ts +358 -0
  95. package/src/module.ts +32 -0
  96. package/src/plugin.ts +62 -0
  97. package/src/positioning.ts +121 -0
  98. package/src/schema.ts +249 -0
  99. package/src/tokens.ts +843 -0
  100. package/src/utils.ts +109 -0
  101. package/src/virtual/document.ts +1250 -0
  102. package/src/ws-connection/server-capability-registration.ts +77 -0
  103. package/src/ws-connection/types.ts +102 -0
  104. package/src/ws-connection/ws-connection.ts +320 -0
package/src/schema.ts ADDED
@@ -0,0 +1,249 @@
1
+ // Copyright (c) Jupyter Development Team.
2
+ // Distributed under the terms of the Modified BSD License.
3
+
4
+ /* eslint-disable */
5
+
6
+ /**
7
+ * This file was automatically generated by json-schema-to-typescript.
8
+ * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
9
+ * and run jlpm build:schema to regenerate this file.
10
+ */
11
+
12
+ /**
13
+ * which version of the spec this implements
14
+ *
15
+ * This interface was referenced by `JupyterLspServerStatusResponse`'s JSON-Schema
16
+ * via the `definition` "current-version".
17
+ */
18
+ export type SpecSchemaVersion = 2;
19
+ /**
20
+ * This interface was referenced by `JupyterLspServerStatusResponse`'s JSON-Schema
21
+ * via the `definition` "env-var".
22
+ *
23
+ * This interface was referenced by `EnvironmentVariables`'s JSON-Schema definition
24
+ * via the `patternProperty` "[^ ]+".
25
+ */
26
+ export type AnEnvironmentVariableMayContainPythonStringTemplateEvaluatedAgainstTheExistingEnvironmentEG$HOME =
27
+ string;
28
+ /**
29
+ * the install commands or description for installing the language server
30
+ *
31
+ * This interface was referenced by `Installation`'s JSON-Schema definition
32
+ * via the `patternProperty` ".+".
33
+ *
34
+ * This interface was referenced by `JupyterLspServerStatusResponse`'s JSON-Schema
35
+ * via the `definition` "install-help".
36
+ *
37
+ * This interface was referenced by `Installation1`'s JSON-Schema definition
38
+ * via the `patternProperty` ".+".
39
+ */
40
+ export type InstallHelp = string;
41
+ /**
42
+ * languages supported by this Language Server
43
+ *
44
+ * This interface was referenced by `JupyterLspServerStatusResponse`'s JSON-Schema
45
+ * via the `definition` "language-list".
46
+ */
47
+ export type LanguageList = [string, ...string[]];
48
+ /**
49
+ * a description of a language server that could be started
50
+ *
51
+ * This interface was referenced by `JupyterLspServerStatusResponse`'s JSON-Schema
52
+ * via the `definition` "language-server-spec".
53
+ *
54
+ * This interface was referenced by `LanguageServerSpecsMap`'s JSON-Schema definition
55
+ * via the `patternProperty` ".*".
56
+ */
57
+ export type LanguageServerSpec = ServerSpecProperties & {
58
+ [k: string]: any;
59
+ };
60
+ /**
61
+ * the arguments to start the language server normally
62
+ */
63
+ export type LaunchArguments = string[];
64
+ /**
65
+ * the arguments to start the language server with more verbose output
66
+ */
67
+ export type DebugArguments = string[];
68
+ /**
69
+ * name shown in the UI
70
+ */
71
+ export type DisplayName = string;
72
+ /**
73
+ * known extensions that can contribute to the Language Server's features
74
+ */
75
+ export type Extensions = LanguageServerExtension[];
76
+ /**
77
+ * list of MIME types supported by the language server
78
+ */
79
+ export type MIMETypes = [string, ...string[]];
80
+ /**
81
+ * information on troubleshooting the installation or auto-detection of the language server
82
+ */
83
+ export type Troubleshooting = string;
84
+ /**
85
+ * a date/time that might not have been recorded
86
+ *
87
+ * This interface was referenced by `JupyterLspServerStatusResponse`'s JSON-Schema
88
+ * via the `definition` "nullable-date-time".
89
+ */
90
+ export type NullableDateTime = string | null;
91
+ /**
92
+ * the count of currently-connected WebSocket handlers
93
+ */
94
+ export type HandlerCount = number;
95
+ /**
96
+ * a list of tokens for running a command
97
+ *
98
+ * This interface was referenced by `JupyterLspServerStatusResponse`'s JSON-Schema
99
+ * via the `definition` "shell-args".
100
+ */
101
+ export type ShellArgs = string[];
102
+
103
+ /**
104
+ * describes the current state of (potentially) running language servers
105
+ */
106
+ export interface JupyterLspServerStatusResponse {
107
+ [k: string]: any;
108
+ }
109
+ /**
110
+ * a JSON schema to configure the Language Server or extension behavior from the client
111
+ *
112
+ * This interface was referenced by `JupyterLspServerStatusResponse`'s JSON-Schema
113
+ * via the `definition` "client-config-schema".
114
+ */
115
+ export interface ClientConfigurationSchema {
116
+ [k: string]: any;
117
+ }
118
+ /**
119
+ * a list of installation approaches keyed by package manager, e.g. pip, npm, yarn, apt
120
+ *
121
+ * This interface was referenced by `JupyterLspServerStatusResponse`'s JSON-Schema
122
+ * via the `definition` "install-bundle".
123
+ */
124
+ export interface Installation {
125
+ [k: string]: InstallHelp;
126
+ }
127
+ /**
128
+ * an extension which can extend the functionality of the language server and client
129
+ *
130
+ * This interface was referenced by `JupyterLspServerStatusResponse`'s JSON-Schema
131
+ * via the `definition` "language-server-extension".
132
+ */
133
+ export interface LanguageServerExtension {
134
+ config_schema?: ClientConfigurationSchema;
135
+ display_name?: string;
136
+ install?: Installation;
137
+ [k: string]: any;
138
+ }
139
+ /**
140
+ * all properties that might be required to start and/or describe a Language Server
141
+ *
142
+ * This interface was referenced by `JupyterLspServerStatusResponse`'s JSON-Schema
143
+ * via the `definition` "partial-language-server-spec".
144
+ */
145
+ export interface ServerSpecProperties {
146
+ argv?: LaunchArguments;
147
+ config_schema?: ClientConfigurationSchema1;
148
+ debug_argv?: DebugArguments;
149
+ display_name?: DisplayName;
150
+ env?: EnvironmentVariables;
151
+ extend?: Extensions;
152
+ /**
153
+ * Whether to write un-saved documents to disk in a transient `.virtual_documents` directory. Well-behaved language servers that work against in-memory files should set this to `false`, which will become the default in the future.
154
+ */
155
+ requires_documents_on_disk?: boolean;
156
+ install?: Installation1;
157
+ languages?: LanguageList;
158
+ mime_types?: MIMETypes;
159
+ troubleshoot?: Troubleshooting;
160
+ urls?: URLs;
161
+ version?: SpecSchemaVersion;
162
+ workspace_configuration?: WorkspaceConfiguration;
163
+ [k: string]: any;
164
+ }
165
+ /**
166
+ * a JSON schema to configure the Language Server behavior from the client
167
+ */
168
+ export interface ClientConfigurationSchema1 {
169
+ [k: string]: any;
170
+ }
171
+ /**
172
+ * additional environment variables to set when starting the language server
173
+ */
174
+ export interface EnvironmentVariables {
175
+ [
176
+ k: string
177
+ ]: AnEnvironmentVariableMayContainPythonStringTemplateEvaluatedAgainstTheExistingEnvironmentEG$HOME;
178
+ }
179
+ /**
180
+ * a list of installation approaches keyed by package manager, e.g. pip, npm, yarn, apt
181
+ */
182
+ export interface Installation1 {
183
+ [k: string]: InstallHelp;
184
+ }
185
+ /**
186
+ * a collection of urls keyed by type, e.g. home, issues
187
+ */
188
+ export interface URLs {
189
+ [k: string]: string;
190
+ }
191
+ /**
192
+ * default values to include in the client `workspace/configuration` reply (also known as `serverSettings`). User may override these defaults. The keys should be fully qualified (dotted) names of settings (nested specification is not supported).
193
+ */
194
+ export interface WorkspaceConfiguration {
195
+ [k: string]: any;
196
+ }
197
+ /**
198
+ * This interface was referenced by `JupyterLspServerStatusResponse`'s JSON-Schema
199
+ * via the `definition` "servers-response".
200
+ */
201
+ export interface ServersResponse {
202
+ sessions: Sessions;
203
+ specs?: LanguageServerSpecsMap;
204
+ version: SpecSchemaVersion;
205
+ [k: string]: any;
206
+ }
207
+ /**
208
+ * named server sessions that are, could be, or were running
209
+ *
210
+ * This interface was referenced by `JupyterLspServerStatusResponse`'s JSON-Schema
211
+ * via the `definition` "sessions".
212
+ */
213
+ export interface Sessions {
214
+ [k: string]: LanguageServerSession;
215
+ }
216
+ /**
217
+ * a language server session
218
+ *
219
+ * This interface was referenced by `Sessions`'s JSON-Schema definition
220
+ * via the `patternProperty` ".*".
221
+ *
222
+ * This interface was referenced by `JupyterLspServerStatusResponse`'s JSON-Schema
223
+ * via the `definition` "session".
224
+ */
225
+ export interface LanguageServerSession {
226
+ handler_count: HandlerCount;
227
+ /**
228
+ * date-time of last seen message from a WebSocket handler
229
+ */
230
+ last_handler_message_at: string | null;
231
+ /**
232
+ * date-time of last seen message from the language server
233
+ */
234
+ last_server_message_at: string | null;
235
+ spec: ServerSpecProperties;
236
+ /**
237
+ * a string describing the current state of the server
238
+ */
239
+ status: 'not_started' | 'starting' | 'started' | 'stopping' | 'stopped';
240
+ }
241
+ /**
242
+ * a set of language servers keyed by their implementation name
243
+ *
244
+ * This interface was referenced by `JupyterLspServerStatusResponse`'s JSON-Schema
245
+ * via the `definition` "language-server-specs-implementation-map".
246
+ */
247
+ export interface LanguageServerSpecsMap {
248
+ [k: string]: LanguageServerSpec;
249
+ }