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

Code snippets do not always appear for insertion, depending on the cursor placement? #73644

Open
vsfeedback opened this issue May 22, 2024 · 1 comment
Assignees
Labels

Comments

@vsfeedback
Copy link

This issue has been moved from a ticket on Developer Community.


[severity:It’s more difficult to complete my work]
There seems to be some logic that prevents certain code snippets from being suggested at various places in a document. I’d like to know if this is a bug or intentional and if intentional I’d like more information about this behavior or a way of controlling it because right now for me it limits how useful code snippets can be

I have created a snippet twc that inserts an extension method call .TagWithCallPath(cc,c)

It is intended to be used on a DbSet:

image.png

My snip has a pink arrow. The suggested snips are in yellow - as, is, switch, with

My snip is not suggested.

If I move the caret to placed after a { then the snip does appear and will insert:

image.png

Why does the snip show here, but not before?

If I press tab when the snip is not suggested, i get "as"


I understand the notion that some snips should be prevented in some places = it would be silly to write var ctor = and suddenly have a constructor appear in the middle of a method but if there is a logic that does something like that it is currently making some of my snippets unusable - how do I turn that off?

If there is no way of turning that off, I wish to raise a feature suggestion of "allow snips to be configured so that they can always be inserted"


Original Comments

Feedback Bot on 5/1/2024, 08:47 PM:

(private comment, text removed)

Wenwen Fan [MSFT] on 5/6/2024, 09:16 PM:

(private comment, text removed)

MaWh on 5/9/2024, 06:37 AM:

(private comment, text removed)

MaWh on 5/9/2024, 06:47 AM:

(private comment, text removed)

Wenwen Fan [MSFT] on 5/20/2024, 09:14 PM:

(private comment, text removed)


Original Solutions

(no solutions)

@dotnet-issue-labeler dotnet-issue-labeler bot added Area-IDE untriaged Issues and PRs which have not yet been triaged by a lead labels May 22, 2024
@genlu genlu removed the untriaged Issues and PRs which have not yet been triaged by a lead label Jun 5, 2024
@genlu
Copy link
Member

genlu commented Jun 5, 2024

@olegtk @akhera99 seems to be related to legacy snippets?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants