@teacss/language-server 0.4.7 → 0.5.0
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 +16 -40
- package/dist/index.d.ts +6 -7
- package/dist/server.js +28 -29
- package/package.json +12 -12
package/README.md
CHANGED
|
@@ -1,51 +1,27 @@
|
|
|
1
1
|
# @teacss/language-server
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
## Purpose
|
|
6
|
-
|
|
7
|
-
The server wraps `@teacss/language-service` as a Language Server Protocol host.
|
|
8
|
-
Its standalone `server` entry can run over stdio, while the bundled VS Code
|
|
9
|
-
host runs the same server over Node IPC.
|
|
10
|
-
|
|
11
|
-
Use this package when an editor client needs a standalone TeaCSS Language
|
|
12
|
-
Server Protocol process or when an editor adapter needs the exported capability
|
|
13
|
-
registrars. It owns LSP transport, workspace settings, document synchronization,
|
|
14
|
-
and config watchers; `@teacss/language-service` owns the transport-neutral
|
|
15
|
-
feature calculations, while `@teacss/vscode` supplies the ready-made VS Code
|
|
16
|
-
host.
|
|
17
|
-
|
|
18
|
-
## Usage
|
|
3
|
+
Language Server Protocol host for TeaCSS editor features.
|
|
19
4
|
|
|
20
5
|
```sh
|
|
21
6
|
teacss-language-server --stdio
|
|
22
7
|
```
|
|
23
8
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
9
|
+
The server wraps `@teacss/language-service` with LSP transport, document
|
|
10
|
+
synchronization, workspace settings, and configuration watchers. It provides
|
|
11
|
+
completion, hover, colors, references, diagnostics, Quick Fixes, semantic
|
|
12
|
+
tokens, and `teacss/normalizeClasses` edits.
|
|
28
13
|
|
|
29
|
-
Settings
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
limits are whole numbers from `0` through `10,000`, rem preview ratios must be
|
|
34
|
-
finite positive numbers, and malformed types or unsupported enums safely
|
|
35
|
-
retain the current setting. Finite completion limits are floored and clamped
|
|
36
|
-
to the documented range.
|
|
14
|
+
Settings use the `teacss` namespace. Updates preserve omitted values.
|
|
15
|
+
Completion limits are clamped to whole numbers from 0 through 10,000; rem
|
|
16
|
+
preview ratios must be finite and positive; malformed settings retain their
|
|
17
|
+
current values.
|
|
37
18
|
|
|
38
|
-
The server watches active entry and preset sources
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
resolution live without retaining the broad CSS subscription. Nested-manifest
|
|
43
|
-
scans and entry-topology reload filtering skip `node_modules`, `dist`, `.temp`,
|
|
44
|
-
`.cache`, and `.git`; active config sources remain watched even there.
|
|
45
|
-
Workspace-folder additions and removals update active roots without restarting
|
|
46
|
-
the server. Config reloads and root changes republish diagnostics for open
|
|
47
|
-
documents. Unrelated settings do not refresh semantic tokens.
|
|
19
|
+
The server watches active entry and preset sources. Before discovery it watches
|
|
20
|
+
CSS broadly within the workspace; after discovery it narrows to entry topology
|
|
21
|
+
and exact configuration sources. Workspace-folder changes update roots without
|
|
22
|
+
a restart, and configuration changes republish diagnostics for open documents.
|
|
48
23
|
|
|
49
|
-
|
|
24
|
+
Use `@teacss/language-service` for transport-neutral integration or
|
|
25
|
+
`@teacss/vscode` for the bundled VS Code host.
|
|
50
26
|
|
|
51
|
-
Pre-1.0.
|
|
27
|
+
Pre-1.0.
|
package/dist/index.d.ts
CHANGED
|
@@ -6,28 +6,27 @@ type WaitUntilInitialized = () => PromiseLike<void>;
|
|
|
6
6
|
//#endregion
|
|
7
7
|
//#region src/capabilities/colorProvider.d.ts
|
|
8
8
|
/** Thin LSP adapter: forwards document-color requests to the language service. */
|
|
9
|
-
declare function registerColorProvider(connection: Connection, documents: TextDocuments<TextDocument>, getService: () => TeacssLanguageService | undefined, waitUntilInitialized?: WaitUntilInitialized): void;
|
|
9
|
+
export declare function registerColorProvider(connection: Connection, documents: TextDocuments<TextDocument>, getService: () => TeacssLanguageService | undefined, waitUntilInitialized?: WaitUntilInitialized): void;
|
|
10
10
|
//#endregion
|
|
11
11
|
//#region src/capabilities/completion.d.ts
|
|
12
12
|
/**
|
|
13
13
|
* Thin LSP adapter: forwards completion + completion-resolve requests to the
|
|
14
14
|
* language service. The service owns the autocomplete instances and their cache.
|
|
15
15
|
*/
|
|
16
|
-
declare function registerCompletion(connection: Connection, documents: TextDocuments<TextDocument>, getService: () => TeacssLanguageService | undefined, waitUntilInitialized?: WaitUntilInitialized): void;
|
|
16
|
+
export declare function registerCompletion(connection: Connection, documents: TextDocuments<TextDocument>, getService: () => TeacssLanguageService | undefined, waitUntilInitialized?: WaitUntilInitialized): void;
|
|
17
17
|
//#endregion
|
|
18
18
|
//#region src/capabilities/hover.d.ts
|
|
19
19
|
/** Thin LSP adapter: forwards `textDocument/hover` to the language service. */
|
|
20
|
-
declare function registerHover(connection: Connection, documents: TextDocuments<TextDocument>, getService: () => TeacssLanguageService | undefined, waitUntilInitialized?: WaitUntilInitialized): void;
|
|
20
|
+
export declare function registerHover(connection: Connection, documents: TextDocuments<TextDocument>, getService: () => TeacssLanguageService | undefined, waitUntilInitialized?: WaitUntilInitialized): void;
|
|
21
21
|
//#endregion
|
|
22
22
|
//#region src/capabilities/references.d.ts
|
|
23
23
|
/** Thin LSP adapter: forwards `textDocument/references` to the language service. */
|
|
24
|
-
declare function registerReferences(connection: Connection, documents: TextDocuments<TextDocument>, getService: () => TeacssLanguageService | undefined, waitUntilInitialized?: WaitUntilInitialized): void;
|
|
24
|
+
export declare function registerReferences(connection: Connection, documents: TextDocuments<TextDocument>, getService: () => TeacssLanguageService | undefined, waitUntilInitialized?: WaitUntilInitialized): void;
|
|
25
25
|
//#endregion
|
|
26
26
|
//#region src/capabilities/semanticTokens.d.ts
|
|
27
27
|
/**
|
|
28
28
|
* Thin LSP adapter: forwards a `textDocument/semanticTokens/full` request to the
|
|
29
29
|
* language service, which produces TeaCSS token-part highlighting.
|
|
30
30
|
*/
|
|
31
|
-
declare function registerSemanticTokens(connection: Connection, documents: TextDocuments<TextDocument>, getService: () => TeacssLanguageService | undefined, waitUntilInitialized?: WaitUntilInitialized): void;
|
|
32
|
-
//#endregion
|
|
33
|
-
export { registerColorProvider, registerCompletion, registerHover, registerReferences, registerSemanticTokens };
|
|
31
|
+
export declare function registerSemanticTokens(connection: Connection, documents: TextDocuments<TextDocument>, getService: () => TeacssLanguageService | undefined, waitUntilInitialized?: WaitUntilInitialized): void;
|
|
32
|
+
//#endregion
|