-
Notifications
You must be signed in to change notification settings - Fork 673
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
Intellisense inside interpolated strings does not appear in some cases #5297
Comments
Any resolution yet ?? I still have this issue with the latest VSCode , C# Dev kit, and Omnisharp on Windows 11. |
Ok I found the solution for my case. Firstly , this is the default behavior ( to NOT auto-trigger intellisense inside strings). To access intellisense inside an interpolated string , the default way is to start typing and then press Ctrl+Space bar for intellisense (quick suggestions). If you want to change this behavior to auto-trigger then go to user settings (by any of the many routes -- like Ctrl+, ). Search for "quick suggestions" and then toggle "on" the "strings" setting in "Editor : Quick Suggestions" section. Then reload window to see the effect. {Note: I found the default behavior much better. Auto trigger inside strings can get annoying for long strings). |
There is an issue in the C# textmate support - the interpolation token type is getting marked as a string by VSCode, so completion will only show up there if completion is enabled in strings (hence why it shows up if you adjust the However, code inside the curly braces shouldn't be getting interpreted as a string. The fix for that issue is here - microsoft/vscode#232772 |
Wonderful. Thanks. |
Issue Description
When I'm typing a first part of a variable name in an interpolated string expression, the intellisense will not trigger, the exception to this so far has been when I try to access an already named variable inside it will trigger the intellisense properly.
Steps to Reproduce
Inside a function put in:
Type
initial_
into the interpolated string.Expected Behavior
An intellisense completion list for
initial_
.Actual Behavior
No list spawned, just reports a syntax error.
Logs
OmniSharp log
C# log
Environment information
VSCode version: 1.68.1
C# Extension: 1.25.0
Mono Information
OmniSharp using mono :6.13.0Dotnet Information
.NET SDK (reflecting any global.json): Version: 6.0.301 Commit: 43f9b18481Runtime Environment:
OS Name: arch
OS Version:
OS Platform: Linux
RID: arch-x64
Base Path: /usr/share/dotnet/sdk/6.0.301/
Host (useful for support):
Version: 6.0.6
Commit: 7cca709db2
.NET SDKs installed:
3.1.120 [/usr/share/dotnet/sdk]
6.0.301 [/usr/share/dotnet/sdk]
.NET runtimes installed:
Microsoft.NETCore.App 3.1.20 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 6.0.6 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
To install additional .NET runtimes or SDKs:
https://aka.ms/dotnet-download
Visual Studio Code Extensions
The text was updated successfully, but these errors were encountered: