dotnet / dotnet/roslyn

C# snippets don't work if LSP Roslyn editor is enabled

Open
#73,428 2 comments 0 reactions 1 assignee Claimed by @akhera99 View on GitHub
Area-IDE Bug Feature - Semantic Snippets LSP
Dominant language
C#
Stars
20.7k
Forks
4.3k
PR merge metrics
PR metrics pending

Description

**Version Used**: Version 17.11.0 Preview 2.0 [34909.95.main]

**Steps to Reproduce**:

1. Enable LSP Roslyn via Preview Features (internal builds only)
2. Restart VS (for step 1 setting to take effect)
3. Create a C# console application
4. At the end of Program.cs, type in "wh" so completion list with "while" snippet appears

![image](https://github.com/dotnet/roslyn/assets/1863656/4420a393-ad4b-401b-983c-d99ba8cbfe3c)

5. Try to complete while snippet (Enter or Tab)

**Actual Behavior**:
Snippet is not expanded, you end up with "wh" in the editor

![image](https://github.com/dotnet/roslyn/assets/1863656/a427683c-49ca-43bc-8da2-c4ef21107c60)

**Expected Behavior**:

"while" loop snippet is inserted
[VS14165741.Roslyn.AlwaysActivateInProcLanguageClient.2.OMHR.zip](https://github.com/dotnet/roslyn/files/15279260/VS14165741.Roslyn.AlwaysActivateInProcLanguageClient.2.OMHR.zip)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.