@@ -12,33 +12,33 @@ Create a **[language server][]** based on **[unified][]** ecosystems.
12
12
13
13
## Contents
14
14
15
- * [ What is this?] ( #what-is-this )
16
- * [ When should I use this?] ( #when-should-i-use-this )
17
- * [ Install] ( #install )
18
- * [ Use] ( #use )
19
- * [ API] ( #api )
20
- * [ ` createUnifiedLanguageServer(options) ` ] ( #createunifiedlanguageserveroptions )
21
- * [ Examples] ( #examples )
22
- * [ Types] ( #types )
23
- * [ Language Server features] ( #language-server-features )
24
- * [ Watching files] ( #watching-files )
25
- * [ Requests] ( #requests )
26
- * [ Configuration] ( #configuration )
27
- * [ Compatibility] ( #compatibility )
28
- * [ Related] ( #related )
29
- * [ Contribute] ( #contribute )
30
- * [ License] ( #license )
15
+ * [ What is this?] ( #what-is-this )
16
+ * [ When should I use this?] ( #when-should-i-use-this )
17
+ * [ Install] ( #install )
18
+ * [ Use] ( #use )
19
+ * [ API] ( #api )
20
+ * [ ` createUnifiedLanguageServer(options) ` ] ( #createunifiedlanguageserveroptions )
21
+ * [ Examples] ( #examples )
22
+ * [ Types] ( #types )
23
+ * [ Language Server features] ( #language-server-features )
24
+ * [ Watching files] ( #watching-files )
25
+ * [ Requests] ( #requests )
26
+ * [ Configuration] ( #configuration )
27
+ * [ Compatibility] ( #compatibility )
28
+ * [ Related] ( #related )
29
+ * [ Contribute] ( #contribute )
30
+ * [ License] ( #license )
31
31
32
32
## What is this?
33
33
34
34
This package exports a function which can be used to create a
35
35
[ language server] [ ] based on [ unified] [ ] processors.
36
36
It can do the following:
37
37
38
- * format documents based on a unified processor
39
- * validate documents based on a unified processor
40
- * support configuration files (such as ` .remarkrc ` ) using
41
- [ ` unified-engine ` ] [ unified-engine ]
38
+ * format documents based on a unified processor
39
+ * validate documents based on a unified processor
40
+ * support configuration files (such as ` .remarkrc ` ) using
41
+ [ ` unified-engine ` ] [ unified-engine ]
42
42
43
43
** unified** is a project that validates and transforms content with abstract
44
44
syntax trees (ASTs).
@@ -58,7 +58,7 @@ various editors.
58
58
59
59
## Install
60
60
61
- This package is [ ESM only] ( https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c ) .
61
+ This package is [ ESM only] [ ] .
62
62
In Node.js (version 16.0+), install with [ npm] [ ] :
63
63
64
64
``` sh
@@ -162,11 +162,11 @@ Name of configuration files to load (`string`, optional).
162
162
163
163
For examples, see the following projects:
164
164
165
- * ` redot-language-server `
166
- (coming soon)
167
- * ` rehype-language-server `
168
- (coming soon)
169
- * [ ` remark-language-server ` ] ( https://github.com/remarkjs/remark-language-server )
165
+ * ` redot-language-server `
166
+ (coming soon)
167
+ * ` rehype-language-server `
168
+ (coming soon)
169
+ * [ ` remark-language-server ` ] ( https://github.com/remarkjs/remark-language-server )
170
170
171
171
## Types
172
172
@@ -187,39 +187,39 @@ change was made.
187
187
Language servers created using this package implement the following language
188
188
server features:
189
189
190
- * ` textDocument/codeAction `
191
- — the language server implements code actions based on the ` expected ` field
192
- on reported messages.
193
- A code action can either insert, replace, or delete text based on the range
194
- of the message and the expected value.
195
- * ` textDocument/didChange `
196
- — when a document is changed by the client, the language server processes it
197
- using a unified pipeline.
198
- Any messages collected are published to the client using
199
- ` textDocument/publishDiagnostics ` .
200
- * ` textDocument/didClose `
201
- — when a document is closed by the client, the language server resets
202
- diagnostics by publishing an empty array using
203
- ` textDocument/publishDiagnostics ` .
204
- * ` textDocument/didOpen `
205
- — when a document is opened by the client, the language server processes it
206
- using a unified pipeline.
207
- Any messages collected are published to the client using
208
- ` textDocument/publishDiagnostics ` .
209
- * ` textDocument/formatting `
210
- — when document formatting is requested by the client, the language server
211
- processes it using a unified pipeline.
212
- The stringified result is returned.
213
- * ` workspace/didChangeWatchedFiles ` and ` workspace/didChangeWorkspaceFolders `
214
- — when the client signals a watched file or workspace has changed, the
215
- language server processes all open files using a unified pipeline.
216
- Any messages collected are published to the client using
217
- ` textDocument/publishDiagnostics ` .
190
+ * ` textDocument/codeAction `
191
+ — the language server implements code actions based on the ` expected ` field
192
+ on reported messages.
193
+ A code action can either insert, replace, or delete text based on the range
194
+ of the message and the expected value.
195
+ * ` textDocument/didChange `
196
+ — when a document is changed by the client, the language server processes it
197
+ using a unified pipeline.
198
+ Any messages collected are published to the client using
199
+ ` textDocument/publishDiagnostics ` .
200
+ * ` textDocument/didClose `
201
+ — when a document is closed by the client, the language server resets
202
+ diagnostics by publishing an empty array using
203
+ ` textDocument/publishDiagnostics ` .
204
+ * ` textDocument/didOpen `
205
+ — when a document is opened by the client, the language server processes it
206
+ using a unified pipeline.
207
+ Any messages collected are published to the client using
208
+ ` textDocument/publishDiagnostics ` .
209
+ * ` textDocument/formatting `
210
+ — when document formatting is requested by the client, the language server
211
+ processes it using a unified pipeline.
212
+ The stringified result is returned.
213
+ * ` workspace/didChangeWatchedFiles ` and ` workspace/didChangeWorkspaceFolders `
214
+ — when the client signals a watched file or workspace has changed, the
215
+ language server processes all open files using a unified pipeline.
216
+ Any messages collected are published to the client using
217
+ ` textDocument/publishDiagnostics ` .
218
218
219
219
### Configuration
220
220
221
- * ` requireConfig ` (default: ` false ` )
222
- — If true, files will only be checked if a configuration file is present.
221
+ * ` requireConfig ` (default: ` false ` )
222
+ — If true, files will only be checked if a configuration file is present.
223
223
224
224
## Compatibility
225
225
@@ -234,10 +234,10 @@ It should work anywhere where LSP 3.6.0 or later is implemented.
234
234
235
235
## Related
236
236
237
- * [ ` unified ` ] ( https://github.com/unifiedjs/unified )
238
- — create pipeline for working with syntax trees
239
- * [ ` unified-args ` ] ( https://github.com/unifiedjs/unified-args )
240
- — create a CLI for a unified pipeline
237
+ * [ ` unified ` ] ( https://github.com/unifiedjs/unified )
238
+ — create pipeline for working with syntax trees
239
+ * [ ` unified-args ` ] ( https://github.com/unifiedjs/unified-args )
240
+ — create a CLI for a unified pipeline
241
241
242
242
## Contribute
243
243
@@ -267,6 +267,8 @@ abide by its terms.
267
267
268
268
[ downloads ] : https://www.npmjs.com/package/unified-language-server
269
269
270
+ [ esm only ] : https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c
271
+
270
272
[ size-badge ] : https://img.shields.io/bundlephobia/minzip/unified-language-server.svg
271
273
272
274
[ size ] : https://bundlephobia.com/result?p=unified-language-server
0 commit comments