|
66 | 66 | " `mkdir \"new directory\"` should be split into `[\"mkdir\", \"new directory\"]`;\n",
|
67 | 67 | " If you have Python installed, you can use `shlex.split(\"your command\")` to\n",
|
68 | 68 | " get such an array.\n",
|
69 |
| - "- the `languages` which the server will respond to, and\n", |
| 69 | + "- the `languages` which the language server will respond to, and\n", |
70 | 70 | "- the schema `version` of the spec (currently `2`)\n",
|
| 71 | + "- `mime_types` by which the notebooks and files will be matched to the langauge\n", |
| 72 | + " server:\n", |
| 73 | + " - for notebooks the MIME type is derived from `language_info`/`mimetype`\n", |
| 74 | + " element of [`kernel_info`][] response (with fallback on to cell metadata if\n", |
| 75 | + " missing from kernel response)\n", |
| 76 | + " - for files the implemntation is frontend-specific; in JupyterLab the MIME\n", |
| 77 | + " type is obtained from the MIME type registry.\n", |
71 | 78 | "\n",
|
72 | 79 | "```python\n",
|
73 | 80 | "# ./jupyter_server_config.json ---------- unique! -----------\n",
|
|
80 | 87 | " \"a-language-server-implementation\": {\n",
|
81 | 88 | " \"version\": 2,\n",
|
82 | 89 | " \"argv\": [\"/absolute/path/to/a-language-server\", \"--stdio\"],\n",
|
83 |
| - " \"languages\": [\"a-language\"]\n", |
| 90 | + " \"languages\": [\"a-language\"],\n", |
| 91 | + " \"mime_types\": [\"text/language\", \"text/x-language\"]\n", |
84 | 92 | " }\n",
|
85 | 93 | " }\n",
|
86 | 94 | " }\n",
|
87 | 95 | "}\n",
|
88 |
| - "```" |
| 96 | + "```\n", |
| 97 | + "\n", |
| 98 | + "[`kernel_info`]:\n", |
| 99 | + " https://jupyter-client.readthedocs.io/en/stable/messaging.html#kernel-info" |
89 | 100 | ]
|
90 | 101 | },
|
91 | 102 | {
|
|
0 commit comments