@azerothjs/language-server 0.4.0-beta.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/README.md +121 -0
- package/dist/cli.d.ts +3 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +7 -0
- package/dist/cli.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +8 -0
- package/dist/index.js.map +1 -0
- package/dist/server.d.ts +15 -0
- package/dist/server.d.ts.map +1 -0
- package/dist/server.js +293 -0
- package/dist/server.js.map +1 -0
- package/package.json +61 -0
package/README.md
ADDED
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
# @azerothjs/language-server
|
|
2
|
+
|
|
3
|
+
## Overview
|
|
4
|
+
|
|
5
|
+
A [Language Server Protocol](https://microsoft.github.io/language-server-protocol/)
|
|
6
|
+
frontend for `.azeroth` files. It is a thin adapter: it owns the LSP connection
|
|
7
|
+
and the document lifecycle and forwards every request to
|
|
8
|
+
[`@azerothjs/language-service`](../language-service), which contains all the
|
|
9
|
+
intelligence (the TypeScript bridge, the markup model, and the providers).
|
|
10
|
+
|
|
11
|
+
Editors that speak LSP (the VS Code extension and the JetBrains plugin in this
|
|
12
|
+
repository, among others) launch this server and talk to it over stdio.
|
|
13
|
+
|
|
14
|
+
## Architecture
|
|
15
|
+
|
|
16
|
+
The server holds one `AzerothLanguageService` for the workspace and a
|
|
17
|
+
document manager (`vscode-languageserver`'s `TextDocuments`). Text changes are
|
|
18
|
+
mirrored into the service with `didOpen`/`didChange`/`didClose`, and each LSP
|
|
19
|
+
request handler calls the matching service method and returns the result almost
|
|
20
|
+
unchanged, because the service's result types already mirror the LSP shapes.
|
|
21
|
+
|
|
22
|
+
```
|
|
23
|
+
editor --LSP/stdio--> language-server --method calls--> language-service
|
|
24
|
+
(this package) (the intelligence)
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
The split keeps protocol concerns (connection, capability negotiation, document
|
|
28
|
+
sync, settings) separate from language concerns (the TypeScript bridge, the
|
|
29
|
+
markup model). The same service instance also powers the unit test suite and can
|
|
30
|
+
back any other host without this package.
|
|
31
|
+
|
|
32
|
+
## Components
|
|
33
|
+
|
|
34
|
+
| File | Role |
|
|
35
|
+
| --- | --- |
|
|
36
|
+
| `server.ts` | LSP wiring: connection, capabilities, document sync, settings, and one handler per request. |
|
|
37
|
+
| `cli.ts` | Executable entry point (`azeroth-language-server`); starts the server over stdio. |
|
|
38
|
+
| `index.ts` | Library entry point; exports `startServer`. |
|
|
39
|
+
|
|
40
|
+
### Settings
|
|
41
|
+
|
|
42
|
+
On initialization the server reads `initializationOptions` and, when the client
|
|
43
|
+
supports it, pulls live configuration with `workspace/configuration`. Settings
|
|
44
|
+
map onto the service's per-feature options (for example completion auto-imports,
|
|
45
|
+
component snippets, and inlay-hint toggles). Clients that push configuration
|
|
46
|
+
changes trigger a refresh and a re-publish of diagnostics.
|
|
47
|
+
|
|
48
|
+
### Diagnostics
|
|
49
|
+
|
|
50
|
+
Diagnostics are pushed (`textDocument/publishDiagnostics`) when a document opens
|
|
51
|
+
or changes, rather than pulled, so errors appear as the user types. Each carries
|
|
52
|
+
its `source` (`azeroth` for markup parse errors, `azeroth-ts` for TypeScript
|
|
53
|
+
errors) from the service.
|
|
54
|
+
|
|
55
|
+
## Running
|
|
56
|
+
|
|
57
|
+
Editors launch the bundled binary over stdio:
|
|
58
|
+
|
|
59
|
+
```sh
|
|
60
|
+
azeroth-language-server --stdio
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
Or embed it (for example in a test or a web host):
|
|
64
|
+
|
|
65
|
+
```ts
|
|
66
|
+
import { startServer } from '@azerothjs/language-server';
|
|
67
|
+
import { createConnection } from 'vscode-languageserver/node.js';
|
|
68
|
+
|
|
69
|
+
startServer(createConnection(/* your reader/writer */));
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
## Capabilities
|
|
73
|
+
|
|
74
|
+
Completion (with resolve), hover, definition, type-definition, references,
|
|
75
|
+
document highlights, rename, document symbols, workspace symbols, signature help,
|
|
76
|
+
full semantic tokens, folding ranges, selection ranges, code actions, document
|
|
77
|
+
and on-type formatting, inlay hints, and push diagnostics. A non-standard
|
|
78
|
+
`azeroth/autoInsert` request backs auto-close-tag and linked-editing behavior in
|
|
79
|
+
clients that wire it up.
|
|
80
|
+
|
|
81
|
+
The legend for semantic tokens is `component`, `tag`, `attribute`, `event`,
|
|
82
|
+
`string`, `delimiter`, with no modifiers. Editors must register the same legend
|
|
83
|
+
so these token types get themed.
|
|
84
|
+
|
|
85
|
+
## Building
|
|
86
|
+
|
|
87
|
+
```sh
|
|
88
|
+
npm run build -w @azerothjs/language-server
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
This runs `tsc -p tsconfig.build.json` and emits `dist/`, including the
|
|
92
|
+
`azeroth-language-server` binary referenced by `bin`. It depends on
|
|
93
|
+
`@azerothjs/language-service` being built first; the repository root
|
|
94
|
+
`npm run build` builds packages in dependency order.
|
|
95
|
+
|
|
96
|
+
For distribution inside an editor, the server and its dependencies are bundled
|
|
97
|
+
into a single file by the editor's build step (see `editors/vscode/esbuild.mjs`).
|
|
98
|
+
|
|
99
|
+
## Testing
|
|
100
|
+
|
|
101
|
+
The server is exercised indirectly through the language-service test suite, which
|
|
102
|
+
covers the request handling by driving the service the server forwards to:
|
|
103
|
+
|
|
104
|
+
```sh
|
|
105
|
+
npm test
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
## Configuration
|
|
109
|
+
|
|
110
|
+
Configuration is supplied by the client through `initializationOptions` and
|
|
111
|
+
`workspace/configuration`. TypeScript intelligence uses the nearest
|
|
112
|
+
`tsconfig.json` in the workspace, resolved by the language service.
|
|
113
|
+
|
|
114
|
+
## Contributing
|
|
115
|
+
|
|
116
|
+
A new feature usually means a new method on `AzerothLanguageService` in the
|
|
117
|
+
language-service package plus a new handler here that registers the capability
|
|
118
|
+
and forwards to it. Keep this package free of language logic; if a handler starts
|
|
119
|
+
making language decisions, that logic belongs in the service. See the
|
|
120
|
+
[language-service README](../language-service/README.md) for the full
|
|
121
|
+
architecture.
|
package/dist/cli.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":""}
|
package/dist/cli.js
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// Binary entry point. Editors launch this with `--stdio` (or over IPC); it
|
|
3
|
+
// creates the standard LSP connection and starts the server. Kept to a single
|
|
4
|
+
// call so all behaviour lives in the testable `startServer`.
|
|
5
|
+
import { startServer } from "./server.js";
|
|
6
|
+
startServer();
|
|
7
|
+
//# sourceMappingURL=cli.js.map
|
package/dist/cli.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AACA,2EAA2E;AAC3E,8EAA8E;AAC9E,6DAA6D;AAE7D,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE1C,WAAW,EAAE,CAAC"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
// @azerothjs/language-server
|
|
2
|
+
//
|
|
3
|
+
// A Language Server Protocol front-end for `.azeroth` files. The CLI binary
|
|
4
|
+
// (`azeroth-language-server`) runs `startServer()` over stdio; this entry point
|
|
5
|
+
// re-exports it so the server can also be embedded (e.g. in a web worker host
|
|
6
|
+
// or an integration test that drives it through an in-memory connection).
|
|
7
|
+
export { startServer } from "./server.js";
|
|
8
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,6BAA6B;AAC7B,EAAE;AACF,4EAA4E;AAC5E,gFAAgF;AAChF,8EAA8E;AAC9E,0EAA0E;AAE1E,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC"}
|
package/dist/server.d.ts
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { type Connection } from 'vscode-languageserver/node.js';
|
|
2
|
+
/**
|
|
3
|
+
* Wires an AzerothJS language server onto an LSP connection. Pass a connection
|
|
4
|
+
* for testing, or omit it to create the standard stdio/IPC connection (used by
|
|
5
|
+
* the CLI binary).
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* ```ts
|
|
9
|
+
* // cli.ts
|
|
10
|
+
* import { startServer } from './server.ts';
|
|
11
|
+
* startServer();
|
|
12
|
+
* ```
|
|
13
|
+
*/
|
|
14
|
+
export declare function startServer(connection?: Connection): void;
|
|
15
|
+
//# sourceMappingURL=server.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAaA,OAAO,EAKH,KAAK,UAAU,EAIlB,MAAM,+BAA+B,CAAC;AAiDvC;;;;;;;;;;;GAWG;AACH,wBAAgB,WAAW,CAAC,UAAU,GAAE,UAA+B,GAAG,IAAI,CAqV7E"}
|
package/dist/server.js
ADDED
|
@@ -0,0 +1,293 @@
|
|
|
1
|
+
// The Language Server Protocol front-end. It owns an LSP connection and a
|
|
2
|
+
// document manager, and delegates every request to an AzerothLanguageService
|
|
3
|
+
// (from @azerothjs/language-service). Because the service's result types
|
|
4
|
+
// already mirror the LSP shapes, this layer is mostly a thin translation: sync
|
|
5
|
+
// document text into the service, forward positions, and hand results back.
|
|
6
|
+
//
|
|
7
|
+
// The actual intelligence - the TypeScript bridge, the markup model, the
|
|
8
|
+
// providers - lives in the service. Keeping the protocol plumbing separate
|
|
9
|
+
// means the same brain powers the LSP server, the unit tests, and any other
|
|
10
|
+
// editor host.
|
|
11
|
+
import { dirname } from 'node:path';
|
|
12
|
+
import { createConnection, TextDocuments, TextDocumentSyncKind, DidChangeConfigurationNotification } from 'vscode-languageserver/node.js';
|
|
13
|
+
import { TextDocument } from 'vscode-languageserver-textdocument';
|
|
14
|
+
import { AzerothLanguageService, SEMANTIC_TOKEN_TYPES, uriToPath } from '@azerothjs/language-service';
|
|
15
|
+
/** Defaults applied when a setting is absent or the client can't supply config. */
|
|
16
|
+
const DEFAULT_SETTINGS = {
|
|
17
|
+
diagnostics: { enable: true },
|
|
18
|
+
format: { enable: true },
|
|
19
|
+
autoClosingTags: true,
|
|
20
|
+
suggest: { autoImports: true, componentSnippets: true },
|
|
21
|
+
inlayHints: {
|
|
22
|
+
enabled: true,
|
|
23
|
+
parameterNames: 'all',
|
|
24
|
+
parameterTypes: true,
|
|
25
|
+
variableTypes: true,
|
|
26
|
+
propertyDeclarationTypes: true,
|
|
27
|
+
functionLikeReturnTypes: true,
|
|
28
|
+
enumMemberValues: true
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
/** The `.azeroth` extension the server is responsible for. */
|
|
32
|
+
const EXTENSION = '.azeroth';
|
|
33
|
+
const SEMANTIC_LEGEND = {
|
|
34
|
+
tokenTypes: [...SEMANTIC_TOKEN_TYPES],
|
|
35
|
+
tokenModifiers: []
|
|
36
|
+
};
|
|
37
|
+
/**
|
|
38
|
+
* Wires an AzerothJS language server onto an LSP connection. Pass a connection
|
|
39
|
+
* for testing, or omit it to create the standard stdio/IPC connection (used by
|
|
40
|
+
* the CLI binary).
|
|
41
|
+
*
|
|
42
|
+
* @example
|
|
43
|
+
* ```ts
|
|
44
|
+
* // cli.ts
|
|
45
|
+
* import { startServer } from './server.ts';
|
|
46
|
+
* startServer();
|
|
47
|
+
* ```
|
|
48
|
+
*/
|
|
49
|
+
export function startServer(connection = createConnection()) {
|
|
50
|
+
const documents = new TextDocuments(TextDocument);
|
|
51
|
+
/** One language service per workspace root (created on initialize). */
|
|
52
|
+
let service = null;
|
|
53
|
+
/** Lazily creates/returns the service, anchored at a sensible root. */
|
|
54
|
+
const ensureService = (anchorUri) => {
|
|
55
|
+
if (!service) {
|
|
56
|
+
service = new AzerothLanguageService(dirname(uriToPath(anchorUri)));
|
|
57
|
+
}
|
|
58
|
+
return service;
|
|
59
|
+
};
|
|
60
|
+
const isAzeroth = (uri) => uri.endsWith(EXTENSION);
|
|
61
|
+
// --- Settings (azeroth.*), pulled from the client and refreshed on change. ---
|
|
62
|
+
let settings = DEFAULT_SETTINGS;
|
|
63
|
+
let hasConfigurationCapability = false;
|
|
64
|
+
/** Merges the client's `azeroth` config over the defaults (tolerant of gaps). */
|
|
65
|
+
const applyConfig = (cfg) => {
|
|
66
|
+
const c = (cfg ?? {});
|
|
67
|
+
const obj = (v) => (typeof v === 'object' && v !== null ? v : {});
|
|
68
|
+
const diagnostics = obj(c.diagnostics);
|
|
69
|
+
const format = obj(c.format);
|
|
70
|
+
const suggest = obj(c.suggest);
|
|
71
|
+
const inlay = obj(c.inlayHints);
|
|
72
|
+
settings =
|
|
73
|
+
{
|
|
74
|
+
diagnostics: { enable: diagnostics.enable !== false },
|
|
75
|
+
format: { enable: format.enable !== false },
|
|
76
|
+
autoClosingTags: c.autoClosingTags !== false,
|
|
77
|
+
suggest: {
|
|
78
|
+
autoImports: suggest.autoImports !== false,
|
|
79
|
+
componentSnippets: suggest.componentSnippets !== false
|
|
80
|
+
},
|
|
81
|
+
inlayHints: {
|
|
82
|
+
enabled: inlay.enabled !== false,
|
|
83
|
+
parameterNames: inlay.parameterNames ?? 'all',
|
|
84
|
+
parameterTypes: inlay.parameterTypes !== false,
|
|
85
|
+
variableTypes: inlay.variableTypes !== false,
|
|
86
|
+
propertyDeclarationTypes: inlay.propertyDeclarationTypes !== false,
|
|
87
|
+
functionLikeReturnTypes: inlay.functionLikeReturnTypes !== false,
|
|
88
|
+
enumMemberValues: inlay.enumMemberValues !== false
|
|
89
|
+
}
|
|
90
|
+
};
|
|
91
|
+
};
|
|
92
|
+
/** Pulls `azeroth` settings from the client (no-op if config isn't supported). */
|
|
93
|
+
const refreshSettings = async () => {
|
|
94
|
+
if (!hasConfigurationCapability) {
|
|
95
|
+
return;
|
|
96
|
+
}
|
|
97
|
+
try {
|
|
98
|
+
applyConfig(await connection.workspace.getConfiguration('azeroth'));
|
|
99
|
+
}
|
|
100
|
+
catch {
|
|
101
|
+
// Client can't supply configuration; keep current settings.
|
|
102
|
+
}
|
|
103
|
+
};
|
|
104
|
+
connection.onInitialize((params) => {
|
|
105
|
+
hasConfigurationCapability = params.capabilities.workspace?.configuration === true;
|
|
106
|
+
const root = params.workspaceFolders?.[0]?.uri ?? params.rootUri ?? undefined;
|
|
107
|
+
if (root) {
|
|
108
|
+
service = new AzerothLanguageService(uriToPath(root));
|
|
109
|
+
}
|
|
110
|
+
// Clients without `workspace/configuration` (e.g. the JetBrains LSP
|
|
111
|
+
// client) pass the `azeroth.*` settings as initializationOptions instead.
|
|
112
|
+
if (params.initializationOptions) {
|
|
113
|
+
applyConfig(params.initializationOptions);
|
|
114
|
+
}
|
|
115
|
+
return {
|
|
116
|
+
capabilities: {
|
|
117
|
+
textDocumentSync: TextDocumentSyncKind.Full,
|
|
118
|
+
completionProvider: {
|
|
119
|
+
resolveProvider: true,
|
|
120
|
+
triggerCharacters: ['<', '.', ' ', '{', ':', '@', '/']
|
|
121
|
+
},
|
|
122
|
+
hoverProvider: true,
|
|
123
|
+
definitionProvider: true,
|
|
124
|
+
typeDefinitionProvider: true,
|
|
125
|
+
referencesProvider: true,
|
|
126
|
+
documentHighlightProvider: true,
|
|
127
|
+
renameProvider: true,
|
|
128
|
+
documentSymbolProvider: true,
|
|
129
|
+
workspaceSymbolProvider: true,
|
|
130
|
+
signatureHelpProvider: { triggerCharacters: ['(', ','] },
|
|
131
|
+
semanticTokensProvider: { legend: SEMANTIC_LEGEND, full: true, range: false },
|
|
132
|
+
foldingRangeProvider: true,
|
|
133
|
+
codeActionProvider: {
|
|
134
|
+
codeActionKinds: ['quickfix', 'refactor']
|
|
135
|
+
},
|
|
136
|
+
documentFormattingProvider: true,
|
|
137
|
+
documentOnTypeFormattingProvider: { firstTriggerCharacter: ';', moreTriggerCharacter: ['}', '\n'] },
|
|
138
|
+
selectionRangeProvider: true,
|
|
139
|
+
linkedEditingRangeProvider: true,
|
|
140
|
+
inlayHintProvider: true
|
|
141
|
+
}
|
|
142
|
+
};
|
|
143
|
+
});
|
|
144
|
+
connection.onInitialized(() => {
|
|
145
|
+
if (hasConfigurationCapability) {
|
|
146
|
+
void connection.client.register(DidChangeConfigurationNotification.type, undefined);
|
|
147
|
+
void refreshSettings();
|
|
148
|
+
}
|
|
149
|
+
});
|
|
150
|
+
connection.onDidChangeConfiguration(async () => {
|
|
151
|
+
await refreshSettings();
|
|
152
|
+
// Re-evaluate diagnostics and ask the client to refresh inlay hints.
|
|
153
|
+
for (const doc of documents.all()) {
|
|
154
|
+
refreshDiagnostics(doc.uri);
|
|
155
|
+
}
|
|
156
|
+
void connection.languages.inlayHint.refresh();
|
|
157
|
+
});
|
|
158
|
+
// --- Document lifecycle: keep the service's buffer in sync, publish diagnostics. ---
|
|
159
|
+
const refreshDiagnostics = (uri) => {
|
|
160
|
+
if (!isAzeroth(uri) || !service) {
|
|
161
|
+
return;
|
|
162
|
+
}
|
|
163
|
+
const diagnostics = settings.diagnostics.enable ? service.getDiagnostics(uri) : [];
|
|
164
|
+
connection.sendDiagnostics({ uri, diagnostics });
|
|
165
|
+
};
|
|
166
|
+
documents.onDidOpen((event) => {
|
|
167
|
+
if (!isAzeroth(event.document.uri)) {
|
|
168
|
+
return;
|
|
169
|
+
}
|
|
170
|
+
ensureService(event.document.uri).didOpen(event.document.uri, event.document.getText());
|
|
171
|
+
refreshDiagnostics(event.document.uri);
|
|
172
|
+
});
|
|
173
|
+
documents.onDidChangeContent((event) => {
|
|
174
|
+
if (!isAzeroth(event.document.uri)) {
|
|
175
|
+
return;
|
|
176
|
+
}
|
|
177
|
+
ensureService(event.document.uri).didChange(event.document.uri, event.document.getText());
|
|
178
|
+
refreshDiagnostics(event.document.uri);
|
|
179
|
+
});
|
|
180
|
+
documents.onDidClose((event) => {
|
|
181
|
+
if (!isAzeroth(event.document.uri) || !service) {
|
|
182
|
+
return;
|
|
183
|
+
}
|
|
184
|
+
service.didClose(event.document.uri);
|
|
185
|
+
connection.sendDiagnostics({ uri: event.document.uri, diagnostics: [] });
|
|
186
|
+
});
|
|
187
|
+
// --- Feature requests: forward to the service, return its (LSP-shaped) results. ---
|
|
188
|
+
// The resolve request doesn't carry the document URI, so remember the last
|
|
189
|
+
// completed document; completion and its resolve always pair up per file.
|
|
190
|
+
let lastCompletionUri = '';
|
|
191
|
+
connection.onCompletion((params) => {
|
|
192
|
+
if (!service || !isAzeroth(params.textDocument.uri)) {
|
|
193
|
+
return [];
|
|
194
|
+
}
|
|
195
|
+
lastCompletionUri = params.textDocument.uri;
|
|
196
|
+
return service.getCompletions(params.textDocument.uri, params.position, settings.suggest);
|
|
197
|
+
});
|
|
198
|
+
connection.onCompletionResolve((item) => {
|
|
199
|
+
if (!service || !lastCompletionUri) {
|
|
200
|
+
return item;
|
|
201
|
+
}
|
|
202
|
+
// The service's CompletionItem mirrors the LSP one; the only shape
|
|
203
|
+
// difference is `kind` optionality, so the cast at this boundary is safe.
|
|
204
|
+
const resolved = service.resolveCompletion(lastCompletionUri, item);
|
|
205
|
+
return {
|
|
206
|
+
...item,
|
|
207
|
+
detail: resolved.detail,
|
|
208
|
+
documentation: resolved.documentation,
|
|
209
|
+
additionalTextEdits: resolved.additionalTextEdits
|
|
210
|
+
};
|
|
211
|
+
});
|
|
212
|
+
connection.onHover((params) => {
|
|
213
|
+
if (!service || !isAzeroth(params.textDocument.uri)) {
|
|
214
|
+
return null;
|
|
215
|
+
}
|
|
216
|
+
const hover = service.getHover(params.textDocument.uri, params.position);
|
|
217
|
+
if (!hover) {
|
|
218
|
+
return null;
|
|
219
|
+
}
|
|
220
|
+
return { contents: { kind: 'markdown', value: hover.contents }, range: hover.range };
|
|
221
|
+
});
|
|
222
|
+
connection.onDefinition((params) => service && isAzeroth(params.textDocument.uri)
|
|
223
|
+
? service.getDefinition(params.textDocument.uri, params.position)
|
|
224
|
+
: []);
|
|
225
|
+
connection.onTypeDefinition((params) => service && isAzeroth(params.textDocument.uri)
|
|
226
|
+
? service.getTypeDefinition(params.textDocument.uri, params.position)
|
|
227
|
+
: []);
|
|
228
|
+
connection.onReferences((params) => service && isAzeroth(params.textDocument.uri)
|
|
229
|
+
? service.getReferences(params.textDocument.uri, params.position)
|
|
230
|
+
: []);
|
|
231
|
+
connection.onDocumentHighlight((params) => service && isAzeroth(params.textDocument.uri)
|
|
232
|
+
? service.getDocumentHighlights(params.textDocument.uri, params.position)
|
|
233
|
+
: []);
|
|
234
|
+
connection.onRenameRequest((params) => service && isAzeroth(params.textDocument.uri)
|
|
235
|
+
? service.getRenameEdits(params.textDocument.uri, params.position, params.newName)
|
|
236
|
+
: null);
|
|
237
|
+
connection.onDocumentSymbol((params) => service && isAzeroth(params.textDocument.uri)
|
|
238
|
+
? service.getDocumentSymbols(params.textDocument.uri)
|
|
239
|
+
: []);
|
|
240
|
+
connection.onWorkspaceSymbol((params) => service ? service.getWorkspaceSymbols(params.query) : []);
|
|
241
|
+
connection.onSignatureHelp((params) => service && isAzeroth(params.textDocument.uri)
|
|
242
|
+
? service.getSignatureHelp(params.textDocument.uri, params.position)
|
|
243
|
+
: null);
|
|
244
|
+
connection.onFoldingRanges((params) => service && isAzeroth(params.textDocument.uri)
|
|
245
|
+
? service.getFoldingRanges(params.textDocument.uri)
|
|
246
|
+
: []);
|
|
247
|
+
connection.onCodeAction((params) => {
|
|
248
|
+
if (!service || !isAzeroth(params.textDocument.uri)) {
|
|
249
|
+
return [];
|
|
250
|
+
}
|
|
251
|
+
const codes = params.context.diagnostics
|
|
252
|
+
.map(diagnostic => (typeof diagnostic.code === 'number' ? diagnostic.code : undefined))
|
|
253
|
+
.filter((code) => code !== undefined);
|
|
254
|
+
return service.getCodeActions(params.textDocument.uri, params.range, codes);
|
|
255
|
+
});
|
|
256
|
+
connection.onDocumentFormatting((params) => service && isAzeroth(params.textDocument.uri) && settings.format.enable
|
|
257
|
+
? service.getFormattingEdits(params.textDocument.uri)
|
|
258
|
+
: []);
|
|
259
|
+
connection.languages.inlayHint.on((params) => service && isAzeroth(params.textDocument.uri)
|
|
260
|
+
? service.getInlayHints(params.textDocument.uri, params.range, settings.inlayHints)
|
|
261
|
+
: []);
|
|
262
|
+
connection.onSelectionRanges((params) => service && isAzeroth(params.textDocument.uri)
|
|
263
|
+
? service.getSelectionRanges(params.textDocument.uri, params.positions)
|
|
264
|
+
: params.positions.map(position => ({ range: { start: position, end: position } })));
|
|
265
|
+
connection.onDocumentOnTypeFormatting((params) => service && isAzeroth(params.textDocument.uri) && settings.format.enable
|
|
266
|
+
? service.getOnTypeFormattingEdits(params.textDocument.uri, params.position, params.ch)
|
|
267
|
+
: []);
|
|
268
|
+
connection.languages.semanticTokens.on((params) => {
|
|
269
|
+
if (!service || !isAzeroth(params.textDocument.uri)) {
|
|
270
|
+
return { data: [] };
|
|
271
|
+
}
|
|
272
|
+
return service.getSemanticTokens(params.textDocument.uri);
|
|
273
|
+
});
|
|
274
|
+
connection.languages.onLinkedEditingRange((params) => {
|
|
275
|
+
if (!service || !isAzeroth(params.textDocument.uri)) {
|
|
276
|
+
return null;
|
|
277
|
+
}
|
|
278
|
+
const ranges = service.getLinkedEditingRanges(params.textDocument.uri, params.position);
|
|
279
|
+
return ranges ? { ranges } : null;
|
|
280
|
+
});
|
|
281
|
+
// Custom request: the client calls this after the user types `>` so the
|
|
282
|
+
// editor can auto-close the opening tag (VS Code has no built-in tag close
|
|
283
|
+
// for custom languages). Returns a snippet string, or null.
|
|
284
|
+
connection.onRequest('azeroth/autoInsert', (params) => {
|
|
285
|
+
if (!service || !isAzeroth(params.textDocument.uri) || !settings.autoClosingTags) {
|
|
286
|
+
return null;
|
|
287
|
+
}
|
|
288
|
+
return service.getAutoCloseTag(params.textDocument.uri, params.position);
|
|
289
|
+
});
|
|
290
|
+
documents.listen(connection);
|
|
291
|
+
connection.listen();
|
|
292
|
+
}
|
|
293
|
+
//# sourceMappingURL=server.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"server.js","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA,0EAA0E;AAC1E,6EAA6E;AAC7E,yEAAyE;AACzE,+EAA+E;AAC/E,4EAA4E;AAC5E,EAAE;AACF,yEAAyE;AACzE,2EAA2E;AAC3E,4EAA4E;AAC5E,eAAe;AAEf,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,OAAO,EACH,gBAAgB,EAChB,aAAa,EACb,oBAAoB,EACpB,kCAAkC,EAKrC,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;AAClE,OAAO,EACH,sBAAsB,EACtB,oBAAoB,EACpB,SAAS,EAIZ,MAAM,6BAA6B,CAAC;AAYrC,mFAAmF;AACnF,MAAM,gBAAgB,GACtB;IACI,WAAW,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE;IAC7B,MAAM,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE;IACxB,eAAe,EAAE,IAAI;IACrB,OAAO,EAAE,EAAE,WAAW,EAAE,IAAI,EAAE,iBAAiB,EAAE,IAAI,EAAE;IACvD,UAAU,EACV;QACI,OAAO,EAAE,IAAI;QACb,cAAc,EAAE,KAAK;QACrB,cAAc,EAAE,IAAI;QACpB,aAAa,EAAE,IAAI;QACnB,wBAAwB,EAAE,IAAI;QAC9B,uBAAuB,EAAE,IAAI;QAC7B,gBAAgB,EAAE,IAAI;KACzB;CACJ,CAAC;AAEF,8DAA8D;AAC9D,MAAM,SAAS,GAAG,UAAU,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AQ,CAAC,CAAC;QACxF,OAAO,MAAM,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC;IACtC,CAAC,CAAC,CAAC;IAEH,wEAAwE;IACxE,2EAA2E;IAC3E,4DAA4D;IAC5D,UAAU,CAAC,SAAS,CAAC,oBAAoB,EAAE,CAAC,MAAwF,EAAE,EAAE;QAEpI,IAAI,CAAC,OAAO,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,YAAY,CAAC,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,eAAe,EAChF,CAAC;YACG,OAAO,IAAI,CAAC;QAChB,CAAC;QACD,OAAO,OAAO,CAAC,eAAe,CAAC,MAAM,CAAC,YAAY,CAAC,GAAG,EAAE,MAAM,CAAC,QAAQ,CAAC,CAAC;IAC7E,CAAC,CAAC,CAAC;IAEH,SAAS,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;IAC7B,UAAU,CAAC,MAAM,EAAE,CAAC;AACxB,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@azerothjs/language-server",
|
|
3
|
+
"version": "0.4.0-beta.1",
|
|
4
|
+
"description": "AzerothJS language server — a Language Server Protocol front-end for .azeroth files",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./dist/index.js",
|
|
7
|
+
"module": "./dist/index.js",
|
|
8
|
+
"types": "./dist/index.d.ts",
|
|
9
|
+
"bin":
|
|
10
|
+
{
|
|
11
|
+
"azeroth-language-server": "./dist/cli.js"
|
|
12
|
+
},
|
|
13
|
+
"exports":
|
|
14
|
+
{
|
|
15
|
+
".":
|
|
16
|
+
{
|
|
17
|
+
"types": "./dist/index.d.ts",
|
|
18
|
+
"import": "./dist/index.js",
|
|
19
|
+
"default": "./dist/index.js"
|
|
20
|
+
},
|
|
21
|
+
"./cli": "./dist/cli.js"
|
|
22
|
+
},
|
|
23
|
+
"files":
|
|
24
|
+
[
|
|
25
|
+
"dist"
|
|
26
|
+
],
|
|
27
|
+
"dependencies":
|
|
28
|
+
{
|
|
29
|
+
"@azerothjs/language-service": "0.4.0-beta.1",
|
|
30
|
+
"typescript": ">=5",
|
|
31
|
+
"vscode-languageserver": "^9",
|
|
32
|
+
"vscode-languageserver-textdocument": "^1"
|
|
33
|
+
},
|
|
34
|
+
"scripts":
|
|
35
|
+
{
|
|
36
|
+
"build": "tsc -p tsconfig.build.json",
|
|
37
|
+
"prepublishOnly": "npm run build"
|
|
38
|
+
},
|
|
39
|
+
"publishConfig":
|
|
40
|
+
{
|
|
41
|
+
"access": "public"
|
|
42
|
+
},
|
|
43
|
+
"author":
|
|
44
|
+
{
|
|
45
|
+
"name": "IntelligentQuantum",
|
|
46
|
+
"email": "IntelligentQuantum@Gmail.Com",
|
|
47
|
+
"url": "https://IntelligentQuantum.Dev/"
|
|
48
|
+
},
|
|
49
|
+
"license": "MIT",
|
|
50
|
+
"repository":
|
|
51
|
+
{
|
|
52
|
+
"type": "git",
|
|
53
|
+
"url": "git+https://github.com/IntelligentQuantum-Dev/AzerothJS.git",
|
|
54
|
+
"directory": "packages/language-server"
|
|
55
|
+
},
|
|
56
|
+
"homepage": "https://github.com/IntelligentQuantum-Dev/AzerothJS/tree/main/packages/language-server",
|
|
57
|
+
"bugs":
|
|
58
|
+
{
|
|
59
|
+
"url": "https://github.com/IntelligentQuantum-Dev/AzerothJS/issues"
|
|
60
|
+
}
|
|
61
|
+
}
|