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

Insert Snippets using it's prefix stop working on version 1.10.1 #21733

Closed
joaosamouco opened this issue Mar 2, 2017 · 9 comments
Closed

Insert Snippets using it's prefix stop working on version 1.10.1 #21733

joaosamouco opened this issue Mar 2, 2017 · 9 comments
Assignees
Labels
*as-designed Described behavior is as designed *question Issue represents a question, should be posted to StackOverflow (VS Code) snippets

Comments

@joaosamouco
Copy link

  • VSCode Version: Code 1.10.1 (653f873, 2017-03-02T00:27:09.350Z)
  • OS Version: Darwin x64 16.4.0
  • Extensions:
Extension Author Version
beautify HookyQR 0.8.8
vscode-docker PeterJausovec 0.0.12
theme-oceanic-next-italic SintrumIT 1.1.14
vscode-theme-onedark akamud 1.3.1
vscode-eslint dbaeumer 1.2.7
githistory donjayamanne 0.1.5
vscode-babel-coloring dzannotti 0.0.4
prettier-vscode esbenp 0.9.0
theme-onedark-sublime joshpeng 0.3.6
VS-code-vagrantfile marcostazi 0.0.4
atom-keybindings ms-vscode 2.0.0
debugger-for-chrome msjsdiag 2.5.5
theme-base16-ocean-dark viatsko 1.0.0

Steps to Reproduce:

  1. Open file
  2. Try to use previously working snippet

Snippets are not detected as they were in the previous version.

@jrieken jrieken added info-needed Issue requires more information from poster snippets labels Mar 2, 2017
@jrieken
Copy link
Member

jrieken commented Mar 2, 2017

@joaosamouco Can you provide more details please?

  • Is that a snippet you have manually created or one you have gotten via an extension?
  • In what language does this happen? Any, a specific one?
  • Does this happen everywhere in the file or only in certain places, like inside jsx-tags or inside comments?
  • When you say 'Snippets are not detected as they were' does that mean they don't show anymore and they still show but don't insert anymore.

Last, please attach a sample of the code in which you want to insert a snippet and at best also the snippet which you want to insert

@joaosamouco
Copy link
Author

  • Manually created snippet
  • Markdown language
  • Everywhere in the file
  • They don't show up in the "IntelliSense tooltip" and they are not autocompleted

I've tried with different files, empty ones and in the middle of existing ones. Nothing works if I try to insert a snippet using it's prefix.

I've tested and they work properly with CMD+SHIFT+P->Insert Snippet->Select Snippet

@joaosamouco joaosamouco changed the title Snippets stop working on version 1.10.1 Insert Snippets using it's prefix stop working on version 1.10.1 Mar 2, 2017
@jrieken
Copy link
Member

jrieken commented Mar 2, 2017

What is the prefix? Can you share the snippet with me?

@joaosamouco
Copy link
Author

Sure.

{
	"Issue report": {
		"prefix": "issue",
		"body": [
			"## Summary",
			"",
			"${1:How would you describe the bug in less than 60 characters? It should quickly and uniquely identify a bug report as well as explain the problem, not your suggested solution.\n\n**Example**: Selecting CFF crashes the Web Application.}",
			"",
			"## Component",
			"",
			"${2:In which sub-part of the software does it occurs?\n\n**Example**: `jscrambler-parser`}",
			"",
			"## Configuration",
			"",
			"${3:Everything that might influence the current behavior but it's not directly related to the issue.\n\n**Example**:\n* Jscrambler 4.0\n* Ultimate Plan}\n* ApplicationId: XXX",
			"",
			"## Description",
			"",
			"${4:The extended details of your problem report.}",
			"",
			"## Steps to Reproduce",
			"",
			"${5:Minimized, easy-to-follow steps that will trigger the bug.\n\n**Example**:\n1. Open Jscrambler WebApp\n2. Create a new application\n3. Select Control Flow Flattening}",
			"",
			"## Actual Results",
			"",
			"${6:What the application did after performing the above steps.\n\n**Example**: The application crashed.}",
			"",
			"## Expected Results",
			"",
			"${7:What the application should have done, if the bug was not present.\n\n**Example**: Should change status of Control Flow Flattening}",
			"",
			"## Additional Information",
			"",
			"${8:Information that might be useful to the developer that will try to solve your issue.\n\n**Example**: API response is not the one that WebApp is expecting.}"
		]
	}
}

@jrieken
Copy link
Member

jrieken commented Mar 2, 2017

hm, I cannot reproduce with that snippet. Do you have any snippet specific settings for IntelliSense, like "editor.snippetSuggestions": "none". Can you try with F1 > Insert Snippet?

screen shot 2017-03-02 at 11 03 53

@joaosamouco
Copy link
Author

joaosamouco commented Mar 2, 2017

I have no specific settings for IntelliSense.

  • It is working if I open the command palette and go to Insert Snippet.
  • It works if I start typing the prefix and press CTRL+Space to force suggestions tooltip to open.
  • It does not work when I start typing the prefix and wait for the suggestions tooltip to open by itself. This worked perfectly on the previous version.

A colleague of mine is able to reproduce the issue on his machine using the same snippet.

@jrieken
Copy link
Member

jrieken commented Mar 2, 2017

Ok, understood. What happened is that we disabled 24x7 IntelliSense for Markdown files by default. Often people were complaining that eager suggestions while typing text is confusion. Therefore we now only show IntelliSense when explicitly asked for (ctrl+space). This is #19733 and if you disagree with the new defaults, please comment there.

To restore the old behaviour, add this to your settings.json

	"[markdown]": {
		"editor.quickSuggestions": true
	}

@jrieken
Copy link
Member

jrieken commented Mar 2, 2017

closing this issue as designed because this was changed on purpose via #19733.

@jrieken jrieken closed this as completed Mar 2, 2017
@jrieken jrieken added *as-designed Described behavior is as designed *question Issue represents a question, should be posted to StackOverflow (VS Code) and removed info-needed Issue requires more information from poster labels Mar 2, 2017
@joaosamouco
Copy link
Author

Awesome. Thanks for the information. Definitely agree with this change.

👍

@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 18, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
*as-designed Described behavior is as designed *question Issue represents a question, should be posted to StackOverflow (VS Code) snippets
Projects
None yet
Development

No branches or pull requests

2 participants