stan-language-server-bin 0.5.0 → 0.5.1
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/bin/cli.js +9 -9
- package/package.json +1 -1
package/bin/cli.js
CHANGED
|
@@ -14005,11 +14005,11 @@ var init_parser = __esm(() => {
|
|
|
14005
14005
|
});
|
|
14006
14006
|
|
|
14007
14007
|
// src/server/cli.ts
|
|
14008
|
-
var
|
|
14008
|
+
var import_node = __toESM(require_main4(), 1);
|
|
14009
14009
|
import { promises } from "fs";
|
|
14010
14010
|
|
|
14011
14011
|
// src/server/index.ts
|
|
14012
|
-
var
|
|
14012
|
+
var import_vscode_languageserver9 = __toESM(require_api3(), 1);
|
|
14013
14013
|
|
|
14014
14014
|
// src/handlers/completion.ts
|
|
14015
14015
|
var import_vscode_languageserver7 = __toESM(require_api3(), 1);
|
|
@@ -28096,10 +28096,10 @@ var startLanguageServer = (connection, reader) => {
|
|
|
28096
28096
|
hasConfigurationCapability = Boolean(capabilities.workspace?.configuration);
|
|
28097
28097
|
hasDynamicConfigurationRequestCapability = Boolean(capabilities.workspace?.configuration && capabilities.workspace?.didChangeConfiguration?.dynamicRegistration);
|
|
28098
28098
|
hasWorkspaceFolderCapability = Boolean(capabilities.workspace?.workspaceFolders);
|
|
28099
|
-
hasSnippetSupport = Boolean(capabilities.textDocument?.completion?.completionItem?.snippetSupport || capabilities.textDocument?.completion?.completionItemKind?.valueSet?.some((kind) => kind ===
|
|
28099
|
+
hasSnippetSupport = Boolean(capabilities.textDocument?.completion?.completionItem?.snippetSupport || capabilities.textDocument?.completion?.completionItemKind?.valueSet?.some((kind) => kind === import_vscode_languageserver9.CompletionItemKind.Snippet));
|
|
28100
28100
|
return {
|
|
28101
28101
|
capabilities: {
|
|
28102
|
-
textDocumentSync:
|
|
28102
|
+
textDocumentSync: import_vscode_languageserver9.TextDocumentSyncKind.Incremental,
|
|
28103
28103
|
completionProvider: {
|
|
28104
28104
|
triggerCharacters: ["~"],
|
|
28105
28105
|
resolveProvider: false
|
|
@@ -28124,7 +28124,7 @@ var startLanguageServer = (connection, reader) => {
|
|
|
28124
28124
|
});
|
|
28125
28125
|
connection.onInitialized(async () => {
|
|
28126
28126
|
if (hasDynamicConfigurationRequestCapability) {
|
|
28127
|
-
await connection.client.register(
|
|
28127
|
+
await connection.client.register(import_vscode_languageserver9.DidChangeConfigurationNotification.type);
|
|
28128
28128
|
connection.console.info("Registered for didChangeConfiguration");
|
|
28129
28129
|
}
|
|
28130
28130
|
connection.console.info("Stan language server is initialized");
|
|
@@ -28141,7 +28141,7 @@ var startLanguageServer = (connection, reader) => {
|
|
|
28141
28141
|
const incomingSettings = change.settings[SERVER_ID] || {};
|
|
28142
28142
|
globalSettings = { ...globalSettings, ...incomingSettings };
|
|
28143
28143
|
}
|
|
28144
|
-
connection.sendRequest(
|
|
28144
|
+
connection.sendRequest(import_vscode_languageserver9.DiagnosticRefreshRequest.type);
|
|
28145
28145
|
});
|
|
28146
28146
|
const getDocumentSettings = async (resource) => {
|
|
28147
28147
|
if (!hasConfigurationCapability) {
|
|
@@ -28178,7 +28178,7 @@ var startLanguageServer = (connection, reader) => {
|
|
|
28178
28178
|
}
|
|
28179
28179
|
return [];
|
|
28180
28180
|
};
|
|
28181
|
-
connection.onRequest(
|
|
28181
|
+
connection.onRequest(import_vscode_languageserver9.DocumentDiagnosticRequest.method, async (params) => {
|
|
28182
28182
|
const folders = await getWorkspaceFolders();
|
|
28183
28183
|
const settings = await getDocumentSettings(params.textDocument.uri);
|
|
28184
28184
|
return {
|
|
@@ -28198,7 +28198,7 @@ var startLanguageServer = (connection, reader) => {
|
|
|
28198
28198
|
connection.console.error(error);
|
|
28199
28199
|
}
|
|
28200
28200
|
connection.sendNotification("window/showMessage", {
|
|
28201
|
-
type:
|
|
28201
|
+
type: import_vscode_languageserver9.MessageType.Error,
|
|
28202
28202
|
message: "Formatting failed due to compile errors. See diagnostics for details."
|
|
28203
28203
|
});
|
|
28204
28204
|
return [];
|
|
@@ -28257,7 +28257,7 @@ if (process.argv.includes("--help") || process.argv.includes("-h")) {
|
|
|
28257
28257
|
}
|
|
28258
28258
|
var connection;
|
|
28259
28259
|
try {
|
|
28260
|
-
connection =
|
|
28260
|
+
connection = import_node.createConnection();
|
|
28261
28261
|
} catch (e) {
|
|
28262
28262
|
if (e instanceof Error && e.message.includes("Use arguments of createConnection")) {
|
|
28263
28263
|
console.error("Error: Missing communication method");
|