question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Allow snippets to target standard token types

See original GitHub issue
yes
  • VSCode Version:Version: 1.48.2
  • OS Version: Windows_NT x64 10.0.19041

Steps to Reproduce:

  1. Open settings.json file and set “editor.quickSuggestions”: { “comments”: false }
  2. Open any javascript file and start typing a comment with “//”
  3. When you press the period key, the snippet window pops up. Annotation 2020-08-26 062626 Annotation 2020-08-26 062704

I’ve tested this with commenting out all of my custom snippets and this problem is fixed. I’m not sure if this feature was intended but more I think of it, I doubt that it was intended so I’m posting it here as a bug.

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

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
jriekencommented, Aug 28, 2020

Internally, we have standard token types, namely comment, string, regex, and everything else. We should extend snippets so that they can enumerate those token types and for instance say they don’t want to work in comments.

0reactions
hiredtocodecommented, Sep 14, 2020

@jrieken Just an update: It seems like this happens in strings as well even if I set the settings to: “editor.quickSuggestions”: { “strings”: false }

So for example: When I’m in let say function and returning a string. Inside the quotes if I type . or ! it gets triggered.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Syntax Highlight Guide | Visual Studio Code Extension API
Tokens are one or more characters that are part of the same program element. Example tokens include operators such as + and *...
Read more >
A Practical and Effective Approach to Find Code Snippets - arXiv
1), preserving the order of the query and the matched target tokens without any overlapping or orphan tokens, we call it type 3...
Read more >
Authenticate an EWS application by using OAuth
The following code snippets show how to use the Microsoft Authentication Library to get authentication tokens for delegated permissions and ...
Read more >
Code snippet - Carbon Design System
Do not use a code snippet if you want the user to change the input value. Our code snippets are read only. Live...
Read more >
GitLab CI/CD job token
A job token might give extra permissions that aren't necessary to access specific ... The target project must be allowlisted for the job...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found