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
Copy file name to clipboardExpand all lines: docs/extensibility/adding-an-lsp-extension.md
+9-29Lines changed: 9 additions & 29 deletions
Original file line number
Diff line number
Diff line change
@@ -20,22 +20,22 @@ The Language Server Protocol (LSP) is a common protocol, in the form of JSON RPC
20
20
21
21
## Language Server Protocol
22
22
23
-
For more information on the protocol itself, see the documentation [here](https://github.com/Microsoft/language-server-protocol). Visual Studio’s implementation of Language Server Protocol is in preview, and support should be considered experimental. The preview release is in the form of an extension ([Language Server Protocol Client Preview](https://marketplace.visualstudio.com/items?itemName=vsext.LanguageServerClientPreview)), **but this extension can only be installed on the preview channel of Visual Studio**. A later release of Visual Studio will include built-in support for Language Server Protocol, at which time the Preview flag will be dropped. **You should not use the preview for production purposes.**
24
-
25
-
For more information on how to create a sample language server or how to integrate an existing language server into Visual Studio Code, see the documentation [here](https://code.visualstudio.com/docs/extensions/example-language-server).
26
-
27
23

28
24
29
25
This article describes how to create a Visual Studio extension that uses an LSP-based language server. It assumes that you have already developed an LSP-based language server and just want to integrate it into Visual Studio.
30
26
31
-
For support within Visual Studio, language servers can communicate with the client (Visual Studio) via the following mechanisms:
27
+
For support within Visual Studio, language servers can communicate with the client (Visual Studio) via any stream based transmission mechanism, i.e.:
32
28
33
29
* Standard input/output streams
34
30
* Named pipes
35
-
* Sockets
31
+
* Sockets (TCP only)
36
32
37
33
The intent of the LSP and support for it in Visual Studio is to onboard language services that are not part of Visual Studio product. It is not intended to extend existing language services (like C#) in Visual Studio. To extend existing languages, refer to the language service’s extensibility guide (for example, the ["Roslyn" .NET Compiler Platform](../extensibility/dotnet-compiler-platform-roslyn-extensibility.md)).
38
34
35
+
For more information on the protocol itself, see the documentation [here](https://github.com/Microsoft/language-server-protocol).
36
+
37
+
For more information on how to create a sample language server or how to integrate an existing language server into Visual Studio Code, see the documentation [here](https://code.visualstudio.com/docs/extensions/example-language-server).
38
+
39
39
## Language Server Protocol features supported
40
40
41
41
The following LSP features are supported in Visual Studio so far:
@@ -70,7 +70,7 @@ completion/resolve | yes
70
70
textDocument/hover | yes
71
71
textDocument/signatureHelp | yes
72
72
textDocument/references | yes
73
-
textDocument/documentHighlight |
73
+
textDocument/documentHighlight | yes
74
74
textDocument/documentSymbol | yes
75
75
textDocument/formatting | yes
76
76
textDocument/rangeFormatting | yes
@@ -93,26 +93,6 @@ Next create a new blank VSIXProject by navigating to **File** > **New Project**
For the preview release, VS support for the LSP will be in the form of a VSIX ([Microsoft.VisualStudio.LanguageServer.Client.Preview](https://marketplace.visualstudio.com/items?itemName=vsext.LanguageServerClientPreview)). Extension developers who wish to create an extension using LSP language servers must take a dependency on this VSIX. Therefore, customers wishing to install a language server extension **must first install the Language Server Protocol Client Preview VSIX.**
97
-
98
-
To define the VSIX dependency, open the VSIX manifest designer for your VSIX (by double-clicking the source.extension.vsixmanifest file in your project) and navigate to **Dependencies**:
99
-
100
-

101
-
102
-
Create a new dependency like the following:
103
-
104
-

105
-
106
-
***Source**: Defined manually
107
-
***Name**: Language Server Protocol Client Preview
> The **Download URL** must be filled in so users installing your extension know how to install the required dependency.
115
-
116
96
### Language server and runtime installation
117
97
118
98
By default, the extensions created to support LSP-based language servers in Visual Studio will not contain the language servers themselves or the runtimes needed to execute them. Extension developers are responsible for distributing the language servers and the runtimes needed. There are several ways to do so:
@@ -290,7 +270,7 @@ Adding support for LSP language servers does not require you to implement your o
290
270
291
271
### Settings
292
272
293
-
Support for custom language-server-specific settings is available for Preview release of LSP support in Visual Studio, but it is still in the process of being improved. Settings are specific to what the language server supports and usually control how the language server emits data. For example, a language server might have a setting for the maximum number of errors reported. Extension authors would define a default value, which can be changed by users for specific projects.
273
+
Support for custom language-server-specific settings is available, but it is still in the process of being improved. Settings are specific to what the language server supports and usually control how the language server emits data. For example, a language server might have a setting for the maximum number of errors reported. Extension authors would define a default value, which can be changed by users for specific projects.
294
274
295
275
Follow these steps below to add support for settings to your LSP language service extension:
296
276
@@ -350,7 +330,7 @@ Diagnostics tracing can be enabled to output all messages between the client and
0 commit comments