Skip to content

Conversation

dibarbet
Copy link
Member

@dibarbet dibarbet commented Feb 5, 2025

fixes issue where whitespace gets added twice for completion items that have upfront text edits.

@dibarbet dibarbet requested a review from a team as a code owner February 5, 2025 23:12
@ghost ghost added Area-IDE untriaged Issues and PRs which have not yet been triaged by a lead labels Feb 5, 2025
Data = capabilityHelper.SupportCompletionListData ? resolveData : null
Data = capabilityHelper.SupportCompletionListData ? resolveData : null,
// By default, all text edits we create include the appropriate whitespace, so tell the client to leave it as-is.
InsertTextMode = LSP.InsertTextMode.AsIs,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

InsertTextMode

Would it make sense to conditionally set this based on whether the capabilityHelper indicated insertTextModeSupport is supported?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

accidentally force pushed, but fixed

Data = capabilityHelper.SupportCompletionListData ? resolveData : null
Data = capabilityHelper.SupportCompletionListData ? resolveData : null,
// By default, all text edits we create include the appropriate whitespace, so tell the client to leave it as-is.
InsertTextMode = LSP.InsertTextMode.AsIs,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

InsertTextMode = LSP.InsertTextMode.AsIs,

could consider adding a test validating this is set

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

accidentally force pushed, but fixed

@dibarbet dibarbet force-pushed the completion_whitespace branch from 6072e58 to bd44932 Compare February 5, 2025 23:59
Copy link
Contributor

@ToddGrun ToddGrun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@dibarbet dibarbet merged commit b5d0226 into dotnet:main Feb 6, 2025
25 checks passed
@dibarbet dibarbet deleted the completion_whitespace branch February 6, 2025 18:55
@dotnet-policy-service dotnet-policy-service bot added this to the Next milestone Feb 6, 2025
@akhera99 akhera99 modified the milestones: Next, 17.14 P2 Feb 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-IDE untriaged Issues and PRs which have not yet been triaged by a lead VSCode
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants