Skip to content

Snippets with prefix with no alpha-nunmeric character have inconsistent behavior #64818

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

Closed
jlelong opened this issue Dec 11, 2018 · 6 comments
Closed
Assignees
Labels
*duplicate Issue identified as a duplicate of another issue(s) suggest IntelliSense, Auto Complete

Comments

@jlelong
Copy link
Contributor

jlelong commented Dec 11, 2018

Consider the following snippets (they are related to LaTeX but can be tested with plain text document)

"subscript": {
	"prefix": "__",
	"body": "_{$0}",
	"description": "Add a subscript"
},
"superscript": {
	"prefix": "**",
	"body": "^{$0}",
	"description": "Add a superscript"
},
"alpha": {
	"prefix": "@a",
	"body": "\\alpha",
	"description": "Insert alpha"
},
"partial": {
	"prefix": "@6",
	"body": "\\partial",
	"description": "Insert partial derivative symbol"
}

The prefix __ does automatically trigger intellisense but ** does not. For **, I have to manually trigger suggestions. Hitting TAB directly after **, without manually triggering suggestions just inserts some spaces.

Then, trying to complete b__ and b** leads to different behaviors
capture d ecran 2018-12-11 a 18 00 08
capture d ecran 2018-12-11 a 18 00 20

Similarly, The prefix @a triggers intellisense but @6requires manual triggering to show the suggestion menu. However, hitting TAB after @6 expands it even no suggestion shows up. This is not coherent with the behavior for **.

  • VSCode Version: 1.29.1
  • OS Version: macOS 10.14.1

Does this issue occur when all extensions are disabled?: Yes

@jrieken jrieken added the suggest IntelliSense, Auto Complete label Dec 12, 2018
@jrieken
Copy link
Member

jrieken commented Dec 12, 2018

/duplicate of #62906 (comment)

@vscodebot vscodebot bot added the *duplicate Issue identified as a duplicate of another issue(s) label Dec 12, 2018
@vscodebot
Copy link

vscodebot bot commented Dec 12, 2018

Thanks for creating this issue! We figured it's covering the same as another one we already have. Thus, we closed this one as a duplicate. You can search for existing issues here. See also our issue reporting guidelines.

Happy Coding!

@vscodebot vscodebot bot closed this as completed Dec 12, 2018
@jlelong
Copy link
Contributor Author

jlelong commented Dec 12, 2018

@jrieken While googling I had come across #62906, which only explains why ** does not automatically trigger 24x7 intellisense. Does this also mean that @6 is not considered an end of word whereas @a is?

Moreover it does not explain why trying to complete b__ and b** leads to different behaviors
capture d ecran 2018-12-11 a 18 00 08
capture d ecran 2018-12-11 a 18 00 20
Note that in both screenshots, intellisense was triggered manually. This is actually the most annoying problem in my issue and it used to work.

@jrieken
Copy link
Member

jrieken commented Dec 12, 2018

Each language defines what a word is - so it depends on that. We have this restriction because we don't want IntelliSense to constantly pop up.

@Astrantia
Copy link

@jrieken Can you point to the documentation about how to define words in languages?

@jrieken
Copy link
Member

jrieken commented Dec 12, 2018

there you go: https://code.visualstudio.com/docs/extensionAPI/extension-points#_contributeslanguages

@vscodebot vscodebot bot locked and limited conversation to collaborators Jan 26, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
*duplicate Issue identified as a duplicate of another issue(s) suggest IntelliSense, Auto Complete
Projects
None yet
Development

No branches or pull requests

3 participants