1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
//! # jlens-lsp
//!
//! A language server ([LSP](https://microsoft.github.io/language-server-protocol/)) for JSONata
//! expressions, built on the [`jlens_schema::LanguageService`]: completion of fields, variables
//! and functions, diagnostics (syntax errors, annotation problems, fields the schema does not
//! have), hover and signature help.
//!
//! Which schema, variables and host functions apply to which files is configured in a
//! `jlens.json` at the root of each workspace folder, mapping path patterns to settings:
//!
//! ```json
//! {
//! "rules/**/*.jsonata": {
//! "schema": "schemas/order.schema.json",
//! "variables": {"minimum": {"type": "number"}},
//! "functions": [{"name": "shipping", "signature": "<ns:n>", "summary": "Shipping cost"}]
//! }
//! }
//! ```
//!
//! The [`config`] module reads these files; `jlens check` uses it too. The `jlens lsp` command of
//! `jlens-cli` runs [`run_stdio`]. Embedders can run [`run`] on
//! another [`lsp_server::Connection`], such as an in-memory one.
pub use ;
/// Runs the server over standard input and output, until the client asks it to exit.