@volar/test-utils 2.0.0-alpha.3 → 2.0.0-alpha.5
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.
- package/README.md +1 -1
- package/index.d.ts +1 -2
- package/index.js +1 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -18,7 +18,7 @@ The returned server handle provides several methods to interact with the languag
|
|
|
18
18
|
|
|
19
19
|
- `initialize(rootUri: string, initializationOptions: InitializationOptions)`: Initializes the language server.
|
|
20
20
|
- `openTextDocument(fileName: string, languageId: string)`: Opens a text document.
|
|
21
|
-
- `
|
|
21
|
+
- `openUntitledDocument(content: string, languageId: string)`: Opens an untitled text document.
|
|
22
22
|
- `closeTextDocument(uri: string)`: Closes a text document.
|
|
23
23
|
- Various `send*Request` methods: Send language-related requests to the server.
|
|
24
24
|
|
package/index.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
|
-
/// <reference types="node" />
|
|
3
2
|
import * as _ from '@volar/language-server/node';
|
|
4
3
|
import * as cp from 'child_process';
|
|
5
4
|
import { TextDocument } from 'vscode-languageserver-textdocument';
|
|
@@ -9,7 +8,7 @@ export declare function startLanguageServer(serverModule: string, cwd?: string |
|
|
|
9
8
|
connection: _.ProtocolConnection;
|
|
10
9
|
initialize(rootUri: string, initializationOptions: _.InitializationOptions): Promise<_.InitializeResult<any>>;
|
|
11
10
|
openTextDocument(fileName: string, languageId: string): Promise<TextDocument>;
|
|
12
|
-
|
|
11
|
+
openUntitledDocument(content: string, languageId: string): Promise<TextDocument>;
|
|
13
12
|
closeTextDocument(uri: string): Promise<void>;
|
|
14
13
|
sendCompletionRequest(uri: string, position: _.Position): Promise<_.CompletionList | null>;
|
|
15
14
|
sendCompletionResolveRequest(item: _.CompletionItem): Promise<_.CompletionItem>;
|
package/index.js
CHANGED
|
@@ -52,7 +52,7 @@ function startLanguageServer(serverModule, cwd) {
|
|
|
52
52
|
}
|
|
53
53
|
return openedDocuments.get(uri);
|
|
54
54
|
},
|
|
55
|
-
async
|
|
55
|
+
async openUntitledDocument(content, languageId) {
|
|
56
56
|
const uri = vscode_uri_1.URI.from({ scheme: 'untitled', path: `Untitled-${untitledCounter++}` }).toString();
|
|
57
57
|
const document = vscode_languageserver_textdocument_1.TextDocument.create(uri, languageId, 0, content);
|
|
58
58
|
openedDocuments.set(uri, document);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@volar/test-utils",
|
|
3
|
-
"version": "2.0.0-alpha.
|
|
3
|
+
"version": "2.0.0-alpha.5",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"files": [
|
|
6
6
|
"**/*.js",
|
|
@@ -15,9 +15,9 @@
|
|
|
15
15
|
"@types/node": "latest"
|
|
16
16
|
},
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@volar/language-server": "2.0.0-alpha.
|
|
18
|
+
"@volar/language-server": "2.0.0-alpha.5",
|
|
19
19
|
"vscode-languageserver-textdocument": "^1.0.11",
|
|
20
20
|
"vscode-uri": "^3.0.8"
|
|
21
21
|
},
|
|
22
|
-
"gitHead": "
|
|
22
|
+
"gitHead": "80f4f8791c304fbcf4a0a8425eae8ea0b5ab739c"
|
|
23
23
|
}
|