@coderline/alphatab-language-server 1.9.0-alpha.1853 → 1.9.0-alpha.1891
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/dist/{server.mjs → common.mjs} +8 -245
- package/dist/common.mjs.map +1 -0
- package/dist/{server.d.ts → index.browser.d.ts} +1 -6
- package/dist/index.browser.min.mjs +13 -0
- package/dist/index.browser.mjs +15 -0
- package/dist/index.node.d.ts +52 -0
- package/dist/index.node.min.mjs +13 -0
- package/dist/index.node.mjs +20 -0
- package/dist/index.node.mjs.map +1 -0
- package/dist/server/browser.d.ts +12 -0
- package/dist/server/browser.min.mjs +13 -0
- package/dist/server/browser.mjs +27 -0
- package/dist/server/browser.mjs.map +1 -0
- package/dist/server/node.d.ts +6 -0
- package/dist/server/node.min.mjs +13 -0
- package/dist/server/node.mjs +25 -0
- package/dist/server/node.mjs.map +1 -0
- package/dist/src.mjs +230 -0
- package/dist/src.mjs.map +1 -0
- package/package.json +28 -8
- package/dist/server.min.mjs +0 -13
- package/dist/server.mjs.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* alphaTab Language Server v1.9.0-alpha.
|
|
2
|
+
* alphaTab Language Server v1.9.0-alpha.1891 (develop, build 1891)
|
|
3
3
|
*
|
|
4
4
|
* Copyright © 2026, Daniel Kuschny and Contributors, All rights reserved.
|
|
5
5
|
*
|
|
@@ -15,8 +15,6 @@ import { TextDocuments } from "vscode-languageserver";
|
|
|
15
15
|
import { DocumentDiagnosticReportKind, PositionEncodingKind, TextDocumentSyncKind } from "vscode-languageserver-protocol";
|
|
16
16
|
import { TextDocument } from "vscode-languageserver-textdocument";
|
|
17
17
|
import { CompletionItemKind, DiagnosticSeverity, InsertTextFormat, ParameterInformation, SignatureInformation, TextEdit, uinteger } from "vscode-languageserver-types";
|
|
18
|
-
import { BrowserMessageReader, BrowserMessageWriter, createConnection } from "vscode-languageserver/lib/browser/main.js";
|
|
19
|
-
import { ProposedFeatures, createConnection as createConnection$1 } from "vscode-languageserver/lib/node/main.js";
|
|
20
18
|
//#region ../alphatex/src/metadata/bar/ac.ts
|
|
21
19
|
var ac = {
|
|
22
20
|
tag: "\\ac",
|
|
@@ -2217,8 +2215,7 @@ var articulation = {
|
|
|
2217
2215
|
shortDescription: "The numeric value of the built-in articulation"
|
|
2218
2216
|
}] }],
|
|
2219
2217
|
examples: `
|
|
2220
|
-
\\track "Drums"
|
|
2221
|
-
\\instrument percussion
|
|
2218
|
+
\\track "Drums" { instrument percussion }
|
|
2222
2219
|
\\tempo 120
|
|
2223
2220
|
\\clef neutral
|
|
2224
2221
|
\\articulation defaults
|
|
@@ -5354,9 +5351,7 @@ function parameterToSyntax(parameter, onlyParameterNames) {
|
|
|
5354
5351
|
if (!onlyParameterNames) {
|
|
5355
5352
|
switch (parameter.parseMode) {
|
|
5356
5353
|
case alphaTab.importer.alphaTex.ArgumentListParseTypesMode.Optional:
|
|
5357
|
-
case alphaTab.importer.alphaTex.ArgumentListParseTypesMode.OptionalAsFloat:
|
|
5358
|
-
p += "?";
|
|
5359
|
-
break;
|
|
5354
|
+
case alphaTab.importer.alphaTex.ArgumentListParseTypesMode.OptionalAsFloat: p += "?";
|
|
5360
5355
|
}
|
|
5361
5356
|
p += `: ${nodeTypesToTypeDocs(parameter)}`;
|
|
5362
5357
|
if (parameter.defaultValue) p += ` = ${parameter.defaultValue}`;
|
|
@@ -5372,9 +5367,7 @@ function nodeTypesToTypeDocs(parameter) {
|
|
|
5372
5367
|
case alphaTab.importer.alphaTex.AlphaTexNodeType.String:
|
|
5373
5368
|
p = valueArray.map((v) => `"${v}"`).join("|");
|
|
5374
5369
|
break;
|
|
5375
|
-
default:
|
|
5376
|
-
p = valueArray.join("|");
|
|
5377
|
-
break;
|
|
5370
|
+
default: p = valueArray.join("|");
|
|
5378
5371
|
}
|
|
5379
5372
|
} else p = typeArray.map((t) => alphaTab.importer.alphaTex.AlphaTexNodeType[t]).join("|");
|
|
5380
5373
|
switch (parameter.parseMode) {
|
|
@@ -5699,9 +5692,7 @@ function mapDiagnostics(atDiag) {
|
|
|
5699
5692
|
case alphaTab.importer.alphaTex.AlphaTexDiagnosticsSeverity.Warning:
|
|
5700
5693
|
diagnostic.severity = DiagnosticSeverity.Warning;
|
|
5701
5694
|
break;
|
|
5702
|
-
case alphaTab.importer.alphaTex.AlphaTexDiagnosticsSeverity.Error:
|
|
5703
|
-
diagnostic.severity = DiagnosticSeverity.Error;
|
|
5704
|
-
break;
|
|
5695
|
+
case alphaTab.importer.alphaTex.AlphaTexDiagnosticsSeverity.Error: diagnostic.severity = DiagnosticSeverity.Error;
|
|
5705
5696
|
}
|
|
5706
5697
|
diagnostics.push(diagnostic);
|
|
5707
5698
|
}
|
|
@@ -6002,7 +5993,7 @@ function signatureDefinitionToHelp(label, docs, signature) {
|
|
|
6002
5993
|
return signatureDocs;
|
|
6003
5994
|
}
|
|
6004
5995
|
//#endregion
|
|
6005
|
-
//#region src/server/
|
|
5996
|
+
//#region src/server/common.ts
|
|
6006
5997
|
function startLanguageServer(serverConnection) {
|
|
6007
5998
|
const documents = new TextDocuments(TextDocument);
|
|
6008
5999
|
serverConnection.onInitialize((params) => {
|
|
@@ -6029,235 +6020,7 @@ function startLanguageServer(serverConnection) {
|
|
|
6029
6020
|
documents.listen(serverConnection);
|
|
6030
6021
|
serverConnection.listen();
|
|
6031
6022
|
}
|
|
6032
|
-
/**
|
|
6033
|
-
* Starts a new language server communicating via WebWorker.
|
|
6034
|
-
* @param readerPort The port used to reading incoming language server messages
|
|
6035
|
-
* @param writerPort The port used to writer outgoing language server messages
|
|
6036
|
-
*/
|
|
6037
|
-
function startWebWorkerLanguageServer(readerPort, writerPort) {
|
|
6038
|
-
startLanguageServer(createConnection(new BrowserMessageReader(readerPort), new BrowserMessageWriter(writerPort)));
|
|
6039
|
-
}
|
|
6040
|
-
/**
|
|
6041
|
-
* Starts a new language server communicating from a Node.js process with a parent Node.js.
|
|
6042
|
-
*/
|
|
6043
|
-
function startNodeLanguageServer() {
|
|
6044
|
-
startLanguageServer(createConnection$1(ProposedFeatures.all));
|
|
6045
|
-
}
|
|
6046
|
-
var alphatex_tmLanguage_default = {
|
|
6047
|
-
$schema: "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json",
|
|
6048
|
-
name: "alphaTex",
|
|
6049
|
-
scopeName: "source.alphatex",
|
|
6050
|
-
uuid: "1ebe68ca-6558-428e-a6af-90831f41e88e",
|
|
6051
|
-
patterns: [{ "include": "#statements" }],
|
|
6052
|
-
repository: {
|
|
6053
|
-
"statements": { "patterns": [
|
|
6054
|
-
{ "include": "#string" },
|
|
6055
|
-
{ "include": "#comment" },
|
|
6056
|
-
{ "include": "#metadata" },
|
|
6057
|
-
{ "include": "#literal" },
|
|
6058
|
-
{ "include": "#expression" },
|
|
6059
|
-
{ "include": "#punctuation-pipe" },
|
|
6060
|
-
{ "include": "#punctuation-dot" },
|
|
6061
|
-
{ "include": "#punctuation-at" }
|
|
6062
|
-
] },
|
|
6063
|
-
"string": { "patterns": [{ "include": "#qstring-single" }, { "include": "#qstring-double" }] },
|
|
6064
|
-
"qstring-single": {
|
|
6065
|
-
"name": "string.quoted.single.alphatex",
|
|
6066
|
-
"begin": "'",
|
|
6067
|
-
"beginCaptures": { "0": { "name": "punctuation.definition.string.begin.alphatex" } },
|
|
6068
|
-
"end": "(\\')|((?:[^\\\\\\n])$)",
|
|
6069
|
-
"endCaptures": {
|
|
6070
|
-
"1": { "name": "punctuation.definition.string.end.alphatex" },
|
|
6071
|
-
"2": { "name": "invalid.illegal.newline.alphatex" }
|
|
6072
|
-
},
|
|
6073
|
-
"patterns": [{ "include": "#string-character-escape" }]
|
|
6074
|
-
},
|
|
6075
|
-
"qstring-double": {
|
|
6076
|
-
"name": "string.quoted.double.alphatex",
|
|
6077
|
-
"begin": "\"",
|
|
6078
|
-
"beginCaptures": { "0": { "name": "punctuation.definition.string.begin.alphatex" } },
|
|
6079
|
-
"end": "(\")|((?:[^\\\\\\n])$)",
|
|
6080
|
-
"endCaptures": {
|
|
6081
|
-
"1": { "name": "punctuation.definition.string.end.alphatex" },
|
|
6082
|
-
"2": { "name": "invalid.illegal.newline.alphatex" }
|
|
6083
|
-
},
|
|
6084
|
-
"patterns": [{ "include": "#string-character-escape" }]
|
|
6085
|
-
},
|
|
6086
|
-
"string-character-escape": {
|
|
6087
|
-
"name": "constant.character.escape.alphatex",
|
|
6088
|
-
"match": "\\\\(u[0-9A-Fa-f]{4}|.|$)"
|
|
6089
|
-
},
|
|
6090
|
-
"comment": { "patterns": [{
|
|
6091
|
-
"name": "comment.block.alphatex",
|
|
6092
|
-
"begin": "/\\*",
|
|
6093
|
-
"beginCaptures": { "0": { "name": "punctuation.definition.comment.alphatex" } },
|
|
6094
|
-
"end": "\\*/",
|
|
6095
|
-
"endCaptures": { "0": { "name": "punctuation.definition.comment.alphatex" } }
|
|
6096
|
-
}, {
|
|
6097
|
-
"begin": "(^[ \\t]+)?(?=//)",
|
|
6098
|
-
"beginCaptures": { "1": { "name": "punctuation.whitespace.comment.leading.alphatex" } },
|
|
6099
|
-
"end": "(?=$)",
|
|
6100
|
-
"patterns": [{
|
|
6101
|
-
"name": "comment.line.double-slash.alphatex",
|
|
6102
|
-
"begin": "//",
|
|
6103
|
-
"beginCaptures": { "0": { "name": "punctuation.definition.comment.alphatex" } },
|
|
6104
|
-
"end": "(?=$)"
|
|
6105
|
-
}]
|
|
6106
|
-
}] },
|
|
6107
|
-
"literal": { "patterns": [{ "include": "#numeric-literal" }] },
|
|
6108
|
-
"numeric-literal": {
|
|
6109
|
-
"name": "constant.numeric.decimal.alphatex",
|
|
6110
|
-
"match": "[0-9]+",
|
|
6111
|
-
"captures": { "0": { "name": "constant.numeric.decimal.alphatex" } }
|
|
6112
|
-
},
|
|
6113
|
-
"expression": { "patterns": [
|
|
6114
|
-
{ "include": "#string" },
|
|
6115
|
-
{ "include": "#comment" },
|
|
6116
|
-
{ "include": "#literal" },
|
|
6117
|
-
{ "include": "#identifier" },
|
|
6118
|
-
{ "include": "#valueList" },
|
|
6119
|
-
{ "include": "#properties" },
|
|
6120
|
-
{ "include": "#punctuation" }
|
|
6121
|
-
] },
|
|
6122
|
-
"valueList": {
|
|
6123
|
-
"begin": "\\(",
|
|
6124
|
-
"beginCaptures": { "0": { "name": "punctuation.definition.value-list.begin.js" } },
|
|
6125
|
-
"end": "\\)",
|
|
6126
|
-
"endCaptures": { "0": { "name": "punctuation.definition.value-list.end.js" } },
|
|
6127
|
-
"patterns": [
|
|
6128
|
-
{ "include": "#string" },
|
|
6129
|
-
{ "include": "#comment" },
|
|
6130
|
-
{ "include": "#literal" },
|
|
6131
|
-
{ "include": "#identifier" }
|
|
6132
|
-
]
|
|
6133
|
-
},
|
|
6134
|
-
"properties": {
|
|
6135
|
-
"begin": "\\{",
|
|
6136
|
-
"beginCaptures": { "0": { "name": "punctuation.definition.properties.begin.js" } },
|
|
6137
|
-
"end": "\\}",
|
|
6138
|
-
"endCaptures": { "0": { "name": "punctuation.definition.properties.end.js" } },
|
|
6139
|
-
"patterns": [
|
|
6140
|
-
{ "include": "#string" },
|
|
6141
|
-
{ "include": "#comment" },
|
|
6142
|
-
{ "include": "#literal" },
|
|
6143
|
-
{ "include": "#identifier" },
|
|
6144
|
-
{ "include": "#valueList" }
|
|
6145
|
-
]
|
|
6146
|
-
},
|
|
6147
|
-
"metadata": {
|
|
6148
|
-
"name": "keyword.metadata.alphatex",
|
|
6149
|
-
"match": "\\\\{1,2}[^\\s]+",
|
|
6150
|
-
"captures": { "0": { "name": "keyword.metadata.alphatex" } }
|
|
6151
|
-
},
|
|
6152
|
-
"identifier": {
|
|
6153
|
-
"name": "variable.identifier.alphatex",
|
|
6154
|
-
"match": "[^@/\"'-\\.:\\(\\)\\{\\}\\|\\*\\\\\\s][^@/\"'\\.:\\(\\)\\{\\}\\|\\*\\\\\\s]+",
|
|
6155
|
-
"captures": { "0": { "name": "variable.identifier.alphatex" } }
|
|
6156
|
-
},
|
|
6157
|
-
"punctuation": { "patterns": [
|
|
6158
|
-
{ "include": "#punctuation-dot" },
|
|
6159
|
-
{ "include": "#punctuation-pipe" },
|
|
6160
|
-
{ "include": "#punctuation-asterisk" },
|
|
6161
|
-
{ "include": "#punctuation-at" }
|
|
6162
|
-
] },
|
|
6163
|
-
"punctuation-pipe": {
|
|
6164
|
-
"name": "punctuation.bar.alphatex",
|
|
6165
|
-
"match": "\\|"
|
|
6166
|
-
},
|
|
6167
|
-
"punctuation-dot": {
|
|
6168
|
-
"name": "punctuation.dot.alphatex",
|
|
6169
|
-
"match": "\\."
|
|
6170
|
-
},
|
|
6171
|
-
"punctuation-asterisk": {
|
|
6172
|
-
"name": "punctuation.asterisk.alphatex",
|
|
6173
|
-
"match": "\\*"
|
|
6174
|
-
},
|
|
6175
|
-
"punctuation-at": {
|
|
6176
|
-
"name": "punctuation.at.alphatex",
|
|
6177
|
-
"match": "@"
|
|
6178
|
-
}
|
|
6179
|
-
}
|
|
6180
|
-
};
|
|
6181
|
-
var language_configuration_default = {
|
|
6182
|
-
comments: {
|
|
6183
|
-
"lineComment": {
|
|
6184
|
-
"comment": "//",
|
|
6185
|
-
"noIndent": false
|
|
6186
|
-
},
|
|
6187
|
-
"blockComment": ["/*", "*/"]
|
|
6188
|
-
},
|
|
6189
|
-
brackets: [
|
|
6190
|
-
["{", "}"],
|
|
6191
|
-
["[", "]"],
|
|
6192
|
-
["(", ")"]
|
|
6193
|
-
],
|
|
6194
|
-
autoClosingPairs: [
|
|
6195
|
-
{
|
|
6196
|
-
"open": "{",
|
|
6197
|
-
"close": "}"
|
|
6198
|
-
},
|
|
6199
|
-
{
|
|
6200
|
-
"open": "[",
|
|
6201
|
-
"close": "]"
|
|
6202
|
-
},
|
|
6203
|
-
{
|
|
6204
|
-
"open": "(",
|
|
6205
|
-
"close": ")"
|
|
6206
|
-
},
|
|
6207
|
-
{
|
|
6208
|
-
"open": "\"",
|
|
6209
|
-
"close": "\""
|
|
6210
|
-
},
|
|
6211
|
-
{
|
|
6212
|
-
"open": "'",
|
|
6213
|
-
"close": "'"
|
|
6214
|
-
}
|
|
6215
|
-
],
|
|
6216
|
-
surroundingPairs: [
|
|
6217
|
-
{
|
|
6218
|
-
"open": "{",
|
|
6219
|
-
"close": "}"
|
|
6220
|
-
},
|
|
6221
|
-
{
|
|
6222
|
-
"open": "[",
|
|
6223
|
-
"close": "]"
|
|
6224
|
-
},
|
|
6225
|
-
{
|
|
6226
|
-
"open": "(",
|
|
6227
|
-
"close": ")"
|
|
6228
|
-
},
|
|
6229
|
-
{
|
|
6230
|
-
"open": "\"",
|
|
6231
|
-
"close": "\""
|
|
6232
|
-
},
|
|
6233
|
-
{
|
|
6234
|
-
"open": "'",
|
|
6235
|
-
"close": "'"
|
|
6236
|
-
}
|
|
6237
|
-
]
|
|
6238
|
-
};
|
|
6239
|
-
//#endregion
|
|
6240
|
-
//#region src/index.ts
|
|
6241
|
-
var documentation = {
|
|
6242
|
-
structuralMetaData,
|
|
6243
|
-
scoreMetaData,
|
|
6244
|
-
staffMetaData,
|
|
6245
|
-
barMetaData,
|
|
6246
|
-
durationChangeProperties,
|
|
6247
|
-
beatProperties,
|
|
6248
|
-
noteProperties
|
|
6249
|
-
};
|
|
6250
|
-
/**
|
|
6251
|
-
* The TextMate grammar definition as JSON encoded.
|
|
6252
|
-
* Write this to a local json (e.g. alphatex.tmLanguage.json ) or pass it to any supported parser for further use.
|
|
6253
|
-
*/
|
|
6254
|
-
var textMateGrammar = alphatex_tmLanguage_default;
|
|
6255
|
-
/**
|
|
6256
|
-
* The contents of a language-configuration.json to use in editors like VSCode.
|
|
6257
|
-
*/
|
|
6258
|
-
var languageConfiguration = language_configuration_default;
|
|
6259
|
-
if (import.meta.main) startNodeLanguageServer();
|
|
6260
6023
|
//#endregion
|
|
6261
|
-
export {
|
|
6024
|
+
export { noteProperties as a, structuralMetaData as c, durationChangeProperties as i, barMetaData as n, scoreMetaData as o, beatProperties as r, staffMetaData as s, startLanguageServer as t };
|
|
6262
6025
|
|
|
6263
|
-
//# sourceMappingURL=
|
|
6026
|
+
//# sourceMappingURL=common.mjs.map
|