Skip to content

Commit 1347e42

Browse files
authored
Merge pull request #2499 from changeworld/patch-32
Delete unnecessary spaces
2 parents 522ed9d + 93a182c commit 1347e42

File tree

1 file changed

+32
-32
lines changed

1 file changed

+32
-32
lines changed

docs/extensibility/adding-an-lsp-extension.md

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ ms.assetid: 52f12785-1c51-4c2c-8228-c8e10316cd83
66
author: "gregvanl"
77
ms.author: "gregvanl"
88
manager: jillfra
9-
ms.workload:
9+
ms.workload:
1010
- "vssdk"
1111
---
1212
# Add a Language Server Protocol extension
@@ -83,9 +83,9 @@ textDocument/rename | yes
8383
## Getting started
8484

8585
> [!NOTE]
86-
> Starting with Visual Studio 15.8 Preview 3, support for the common Language Server Protocol is built into Visual Studio. If you've built LSP extensions using our preview [Language Server Client VSIX](https://marketplace.visualstudio.com/items?itemName=vsext.LanguageServerClientPreview) version, they will stop working once to you've upgraded to 15.8 Preview 3 or higher. You will need to do the following to get your LSP extensions working again:
86+
> Starting with Visual Studio 15.8 Preview 3, support for the common Language Server Protocol is built into Visual Studio. If you've built LSP extensions using our preview [Language Server Client VSIX](https://marketplace.visualstudio.com/items?itemName=vsext.LanguageServerClientPreview) version, they will stop working once to you've upgraded to 15.8 Preview 3 or higher. You will need to do the following to get your LSP extensions working again:
8787
>
88-
> 1. Uninstall the Microsoft Visual Studio Language Server Protocol Preview VSIX. Starting with 15.8 Preview 4, every time you perform an upgrade in Visual Studio, we will automatically detect and remove the preview VSIX for you during the upgrade process.
88+
> 1. Uninstall the Microsoft Visual Studio Language Server Protocol Preview VSIX. Starting with 15.8 Preview 4, every time you perform an upgrade in Visual Studio, we will automatically detect and remove the preview VSIX for you during the upgrade process.
8989
>
9090
> 2. Update your Nuget reference to the latest non-preview version for [LSP packages](https://www.nuget.org/packages/Microsoft.VisualStudio.LanguageServer.Client).
9191
>
@@ -123,10 +123,10 @@ The LSP does not include specification on how to provide text colorization for l
123123

124124
4. Create a *.pkgdef* file and add a line similar to this:
125125

126-
```xml
127-
[$RootKey$\TextMate\Repositories]
128-
"MyLang"="$PackageFolder$\Grammars"
129-
```
126+
```xml
127+
[$RootKey$\TextMate\Repositories]
128+
"MyLang"="$PackageFolder$\Grammars"
129+
```
130130

131131
5. Right-click on the files and select **Properties**. Change the **Build** action to **Content** and the **Include in VSIX** property to true.
132132

@@ -286,31 +286,31 @@ Follow these steps below to add support for settings to your LSP language servic
286286

287287
1. Add a JSON file (for example, *MockLanguageExtensionSettings.json*) in your project that contains the settings and their default values. For example:
288288

289-
```json
290-
{
291-
"foo.maxNumberOfProblems": -1
292-
}
293-
```
289+
```json
290+
{
291+
"foo.maxNumberOfProblems": -1
292+
}
293+
```
294294
2. Right-click on the JSON file and select **Properties**. Change the **Build** action to "Content" and the "Include in VSIX' property to true.
295295

296296
3. Implement ConfigurationSections and return the list of prefixes for the settings defined in the JSON file (In Visual Studio Code, this would map to the configuration section name in package.json):
297297

298-
```csharp
299-
public IEnumerable<string> ConfigurationSections
300-
{
301-
get
302-
{
303-
yield return "foo";
304-
}
305-
}
306-
```
298+
```csharp
299+
public IEnumerable<string> ConfigurationSections
300+
{
301+
get
302+
{
303+
yield return "foo";
304+
}
305+
}
306+
```
307307

308308
4. Add a .pkgdef file to the project (add new text file and change the file extension to .pkgdef). The pkgdef file should contain this info:
309309

310-
```xml
310+
```xml
311311
[$RootKey$\OpenFolder\Settings\VSWorkspaceSettings\[settings-name]]
312312
@="$PackageFolder$\[settings-file-name].json"
313-
```
313+
```
314314

315315
Sample:
316316
```xml
@@ -334,13 +334,13 @@ Follow these steps below to add support for settings to your LSP language servic
334334
2. User adds a file in the *.vs* folder called *VSWorkspaceSettings.json*.
335335
3. User adds a line to the *VSWorkspaceSettings.json* file for a setting the server provides. For example:
336336

337-
```json
338-
{
339-
"foo.maxNumberOfProblems": 10
340-
}
341-
```
342-
### Enabling diagnostics tracing
343-
Diagnostics tracing can be enabled to output all messages between the client and server, which can be useful when debugging issues. To enable diagnostic tracing, do the following:
337+
```json
338+
{
339+
"foo.maxNumberOfProblems": 10
340+
}
341+
```
342+
### Enabling diagnostics tracing
343+
Diagnostics tracing can be enabled to output all messages between the client and server, which can be useful when debugging issues. To enable diagnostic tracing, do the following:
344344

345345
4. Open or create the workspace settings file *VSWorkspaceSettings.json* (see "User editing of settings for a workspace").
346346
5. Add the following line in the settings json file:
@@ -356,7 +356,7 @@ There are three possible values for trace verbosity:
356356
* "Messages": tracing turned on but only method name and response ID are traced.
357357
* "Verbose": tracing turned on; the entire rpc message is traced.
358358

359-
When tracing is turned on the content is written to a file in the *%temp%\VisualStudio\LSP* directory. The log follows the naming format *[LanguageClientName]-[Datetime Stamp].log*. Currently, tracing can only be enabled for open folder scenarios. Opening a single file to activate a language server does not have diagnostics tracing support.
359+
When tracing is turned on the content is written to a file in the *%temp%\VisualStudio\LSP* directory. The log follows the naming format *[LanguageClientName]-[Datetime Stamp].log*. Currently, tracing can only be enabled for open folder scenarios. Opening a single file to activate a language server does not have diagnostics tracing support.
360360

361361
### Custom messages
362362

@@ -419,7 +419,7 @@ internal class MockCustomLanguageClient : MockLanguageClient, ILanguageClientCus
419419
}
420420

421421
public async Task SendServerCustomNotification(object arg)
422-
{
422+
{
423423
await this.customMessageRpc.NotifyWithParameterObjectAsync("OnCustomNotification", arg);
424424
}
425425

0 commit comments

Comments
 (0)