Skip to content

Commit 817f841

Browse files
akhera99dibarbet
andauthored
Adds an option to disable auto insert (#7381)
Co-authored-by: David Barbet <[email protected]>
1 parent 7bb453f commit 817f841

File tree

5 files changed

+38
-6
lines changed

5 files changed

+38
-6
lines changed

CHANGELOG.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,29 @@
44
- Debug from .csproj and .sln [#5876](https://github.com/dotnet/vscode-csharp/issues/5876)
55

66
# 2.60.x
7+
* Update Roslyn to 4.13.0-3.24604.4 (PR: [#7381](https://github.com/dotnet/vscode-csharp/pull/7381))
8+
* Add option to disable LSP-based auto insert (PR: [#75224](https://github.com/dotnet/roslyn/pull/75224))
9+
* Report errors processing messages in the build host (PR: [#76252](https://github.com/dotnet/roslyn/pull/76252))
10+
* Update FAR and Go to Def to work on indexers (PR: [#76220](https://github.com/dotnet/roslyn/pull/76220))
11+
* Fix NFW thrown when refreshing source generated files (PR: [#76240](https://github.com/dotnet/roslyn/pull/76240))
12+
* Update find-refs to find references to Dispose in a using-statement (PR: [#76221](https://github.com/dotnet/roslyn/pull/76221))
13+
* Add support for 'find refs' finding references to 'dynamic' (PR: [#76118](https://github.com/dotnet/roslyn/pull/76118))
14+
* Support implementing protected members in implement interface (PR: [#76178](https://github.com/dotnet/roslyn/pull/76178))
15+
* Do not treat Task.Run methods as 'apparent' for 'use var' (PR: [#76229](https://github.com/dotnet/roslyn/pull/76229))
16+
* Support introduce variable at the top level (PR: [#76218](https://github.com/dotnet/roslyn/pull/76218))
17+
* Fix switch indentation for list patterns (PR: [#75953](https://github.com/dotnet/roslyn/pull/75953))
18+
* Keep member bodies when converting DIM property to method (PR: [#76186](https://github.com/dotnet/roslyn/pull/76186))
19+
* Have go-to-def flip between partial definition and implementation (PR: [#76187](https://github.com/dotnet/roslyn/pull/76187))
20+
* Disable 'use coalesce expression' when statements cross a PP boundary (PR: [#76173](https://github.com/dotnet/roslyn/pull/76173))
21+
* Support name completion on generic types (PR: [#76170](https://github.com/dotnet/roslyn/pull/76170))
22+
* Improve extract-local-function in the presence of pp directives (PR: [#76169](https://github.com/dotnet/roslyn/pull/76169))
23+
* Fix issue trying to generate fields/properties from a top level program (PR: [#76161](https://github.com/dotnet/roslyn/pull/76161))
24+
* Update 'introduce using' to support expression statements (PR: [#76147](https://github.com/dotnet/roslyn/pull/76147))
25+
* Use implicit initializer if present to generate type properties (PR: [#76162](https://github.com/dotnet/roslyn/pull/76162))
26+
* Fix issue with explicit interface completion and static interface members (PR: [#76150](https://github.com/dotnet/roslyn/pull/76150))
27+
* When converting to raw strings, do not change \r\n sequences if not explicitly requested by the user (PR: [#76120](https://github.com/dotnet/roslyn/pull/76120))
28+
* Exclude starting symbol when going to implementations if we find implementations (PR: [#76125](https://github.com/dotnet/roslyn/pull/76125))
29+
* Add option to disable auto insertion of documentation comments (PR: [#7381](https://github.com/dotnet/vscode-csharp/pull/7381))
730
* Bump xamltools to 17.13.35604.65 (PR: [#7848](https://github.com/dotnet/vscode-csharp/pull/7848))
831

932
# 2.59.x

package.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
}
3838
},
3939
"defaults": {
40-
"roslyn": "4.13.0-3.24577.4",
40+
"roslyn": "4.13.0-3.24604.4",
4141
"omniSharp": "1.39.11",
4242
"razor": "9.0.0-preview.24569.4",
4343
"razorOmnisharp": "7.0.0-preview.23363.1",
@@ -733,6 +733,11 @@
733733
"title": "Text Editor",
734734
"order": 1,
735735
"properties": {
736+
"dotnet.autoInsert.enableAutoInsert": {
737+
"type": "boolean",
738+
"default": true,
739+
"description": "%configuration.dotnet.autoInsert.enableAutoInsert%"
740+
},
736741
"dotnet.typeMembers.memberInsertionLocation": {
737742
"type": "string",
738743
"enum": [

package.nls.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
"command.dotnet.test.runTestsInContext": "Run Tests in Context",
2424
"command.dotnet.test.debugTestsInContext": "Debug Tests in Context",
2525
"command.dotnet.restartServer": "Restart Language Server",
26+
"configuration.dotnet.autoInsert.enableAutoInsert": "Enable automatic insertion of documentation comments.",
2627
"configuration.dotnet.defaultSolution.description": "The path of the default solution to be opened in the workspace, or set to 'disable' to skip it. (Previously `omnisharp.defaultLaunchSolution`)",
2728
"configuration.dotnet.server.path": "Specifies the absolute path to the server (LSP or O#) executable. When left empty the version pinned to the C# Extension is used. (Previously `omnisharp.path`)",
2829
"configuration.dotnet.server.componentPaths": "Allows overriding the folder path for built in components of the language server (for example, override the .roslynDevKit path in the extension directory to use locally built components)",

test/lsptoolshost/integrationTests/gotoImplementation.integration.test.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,16 +35,13 @@ describe(`Go To Implementation Tests`, () => {
3535
const requestPosition = new vscode.Position(4, 22);
3636
const implementationList = await getImplementations(requestPosition);
3737

38-
expect(implementationList).toHaveLength(3);
38+
expect(implementationList).toHaveLength(2);
3939

4040
expect(implementationList[0].uri.path).toContain('BaseClassImplementation.cs');
4141
expect(implementationList[0].range).toStrictEqual(new vscode.Range(2, 17, 2, 40));
4242

4343
expect(implementationList[1].uri.path).toContain('implementation.cs');
44-
expect(implementationList[1].range).toStrictEqual(new vscode.Range(4, 17, 4, 26));
45-
46-
expect(implementationList[2].uri.path).toContain('implementation.cs');
47-
expect(implementationList[2].range).toStrictEqual(new vscode.Range(5, 17, 5, 26));
44+
expect(implementationList[1].range).toStrictEqual(new vscode.Range(5, 17, 5, 26));
4845
});
4946
});
5047

test/lsptoolshost/unitTests/configurationMiddleware.test.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,12 @@ const testData = [
261261
vsCodeConfiguration: null,
262262
declareInPackageJson: false,
263263
},
264+
{
265+
serverOption: 'csharp|auto_insert.dotnet_enable_auto_insert',
266+
vsCodeConfiguration: 'dotnet.autoInsert.enableAutoInsert',
267+
declareInPackageJson: true,
268+
section: editorBehaviorSection,
269+
},
264270
];
265271

266272
describe('Server option name to vscode configuration name test', () => {

0 commit comments

Comments
 (0)