Code snippets do not always appear for insertion, depending on the cursor placement?
- Dominant language
- C#
- Stars
- 20.7k
- Forks
- 4.3k
- PR merge metrics
- PR metrics pending
Description
_This issue has been moved from [a ticket on Developer Community](https://developercommunity.visualstudio.com/t/Code-snippets-do-not-always-appear-for-i/10650252)._
---
\[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:

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:

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)
Contributor guide
Assessment
This issue has not been assessed yet.