Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow snippet format in XAML compeltion #54183

Merged
merged 3 commits into from
Jun 18, 2021

Conversation

LinglingTong
Copy link
Contributor

This change gives XAML language service the capability to tell LSP completion whether the inset text format is snippet or just plaintext. So we will be able to do completions like inserting ="|" when committing a XAML attribute.

@LinglingTong LinglingTong requested a review from a team as a code owner June 17, 2021 19:18
@LinglingTong
Copy link
Contributor Author

@mgoertz-msft @dibarbet Could you please help to take a look?

@@ -46,6 +46,7 @@ internal class XamlInProcLanguageClient : AbstractInProcLanguageClient

/// <summary>
/// Gets the name of the language client (displayed in yellow bars).
/// When updating the string of Name, please make sure to update the same string in Microsoft.VisualStudio.LanguageServer.Client.ExperimentalSnippetSupport.AllowList
Copy link
Member

Choose a reason for hiding this comment

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

@NTaylorMullen wanted to check, is snippet support being expanded outside of razor

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah we have already chatted with Taylor about adding this support in XAML.

Copy link
Contributor

Choose a reason for hiding this comment

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

Yup we good!

@@ -27,5 +27,6 @@ internal class XamlCompletionItem
public ISymbol Symbol { get; set; }
public XamlEventDescription? EventDescription { get; set; }
public bool RetriggerCompletion { get; set; }
public bool InsertSnippet { get; set; }
Copy link
Contributor

Choose a reason for hiding this comment

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

How about IsSnippet?

Copy link
Contributor

@mgoertz-msft mgoertz-msft left a comment

Choose a reason for hiding this comment

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

:shipit:

@mgoertz-msft mgoertz-msft merged commit 4705cf5 into dotnet:main Jun 18, 2021
@ghost ghost added this to the Next milestone Jun 18, 2021
@RikkiGibson RikkiGibson modified the milestones: Next, 17.0.P2 Jun 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants