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

[Question] Will there be a way to get XAML completions or diagnostics with Roslyn? #73503

Closed
JaneySprings opened this issue May 16, 2024 · 2 comments
Labels
untriaged Issues and PRs which have not yet been triaged by a lead

Comments

@JaneySprings
Copy link

Hi! I tried the new version of C# DevKit and it shows me an Intellisense for XAML code. Will it be possible to use this mechanism as it is done with C# Completion (CompletionService.GetCompletionsAsync)? Or maybe with reflection?

For example: new C# DevKit + MAUI project:

image

@dotnet-issue-labeler dotnet-issue-labeler bot added the untriaged Issues and PRs which have not yet been triaged by a lead label May 16, 2024
Copy link

I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label.

@mgoertz-msft
Copy link
Contributor

@JaneySprings While the XAML IntelliSense engine uses Roslyn and runs inside of the Roslyn LSP language server process it does not expose any public extensibility points. In other words, no, it is not possible to use Roslyn APIs to query for XAML completions for example.

However, you should be able to write your own additional document analyzer for XAML now and provide code fixes that should show up as lightbulb code actions in VS Code for .NET MAUI XAML files. You would still have to do your own XAML parsing though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
untriaged Issues and PRs which have not yet been triaged by a lead
Projects
None yet
Development

No branches or pull requests

2 participants