You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
These are the available keys and descriptions for the file.
22
+
These are the available keys and descriptions for a language.
23
23
24
24
| Key | Description |
25
25
| ---- | ----------- |
26
26
|`name`| The name of the language |
27
+
|`language-id`| The language-id for language servers, checkout the table at [TextDocumentItem](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#textDocumentItem) for the right id |
27
28
|`scope`| A string like `source.js` that identifies the language. Currently, we strive to match the scope names used by popular TextMate grammars and by the Linguist library. Usually `source.<name>` or `text.<name>` in case of markup languages |
28
29
|`injection-regex`| regex pattern that will be tested against a language name in order to determine whether this language should be used for a potential [language injection][treesitter-language-injection] site. |
29
30
|`file-types`| The filetypes of the language, for example `["yml", "yaml"]`. Extensions and full file names are supported. |
@@ -33,10 +34,76 @@ These are the available keys and descriptions for the file.
33
34
|`diagnostic-severity`| Minimal severity of diagnostic for it to be displayed. (Allowed values: `Error`, `Warning`, `Info`, `Hint`) |
34
35
|`comment-token`| The token to use as a comment-token |
35
36
|`indent`| The indent to use. Has sub keys `tab-width` and `unit`|
36
-
|`language-server`| The Language Server to run. Has sub keys `command` and `args`|
37
-
|`config`| Language Server configuration |
37
+
|`language-servers`| The Language Servers used for this language. See below for more information |
38
38
|`grammar`| The tree-sitter grammar to use (defaults to the value of `name`) |
39
39
40
+
41
+
In case multiple language servers are specified, it's often useful to only enable certain language-server features for these language servers.
42
+
For example `efm-lsp-prettier` (see in the next section for an example configuration for typescript) is used only with a formatting command `prettier`
43
+
but everything else should be handled by the `typescript-language-server` (configured by default)
44
+
The language configuration for typescript could look like this:
0 commit comments