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

still show suggestions in string when disable string suggestion #136611

Closed
tjx666 opened this issue Nov 7, 2021 · 7 comments
Closed

still show suggestions in string when disable string suggestion #136611

tjx666 opened this issue Nov 7, 2021 · 7 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug insiders-released Patch has been released in VS Code Insiders snippets suggest IntelliSense, Auto Complete under-discussion Issue is under discussion for relevance, priority, approach verified Verification succeeded
Milestone

Comments

@tjx666
Copy link
Contributor

tjx666 commented Nov 7, 2021

Version:

Version: 1.63.0-insider (Universal)
Commit: 552af97a0170b43c9323bec62211feb184da9749
Date: 2021-11-05T05:15:13.016Z
Electron: 13.5.1
Chrome: 91.0.4472.164
Node.js: 14.16.0
V8: 9.1.269.39-electron.0
OS: Darwin x64 21.1.0

some config:

{
  "editor.lightbulb.enabled": false,
  "editor.linkedEditing": true,
  "editor.minimap.enabled": false,
  "editor.quickSuggestions": {
    "strings": false,
    "comments": false,
    "other": true
  },
  "editor.smoothScrolling": true,
  "editor.stickyTabStops": true,
  "editor.suggest.preview": true,
  "editor.suggest.shareSuggestSelections": true,
  "editor.suggest.snippetsPreventQuickSuggestions": false,
  "editor.suggestSelection": "first",
}

Steps to Reproduce:

1.reload VSCode with extension disable
2.open a ts file and type quote, the suggestions still display

image

@jrieken
Copy link
Member

jrieken commented Nov 8, 2021

Looks like ' is registered as trigger character... Unsure if there is anything from TS. What's unhappy is that snippets are also invoked and showing. I need to remember why that was done

@jrieken jrieken added snippets suggest IntelliSense, Auto Complete typescript Typescript support issues labels Nov 8, 2021
@mjbvz
Copy link
Contributor

mjbvz commented Nov 8, 2021

Yes we register ' as a trigger character for import paths:

public static readonly triggerCharacters = ['.', '"', '\'', '`', '/', '@', '<', '#', ' '];

@jrieken jrieken added the under-discussion Issue is under discussion for relevance, priority, approach label Nov 9, 2021
@jrieken
Copy link
Member

jrieken commented Nov 9, 2021

What's unhappy is that snippets are also invoked and showing. I need to remember why that was done

Snippets are invoked with forgein trigger characters because of #37166

@mrhyde

This comment has been minimized.

@DanTup
Copy link
Contributor

DanTup commented Nov 16, 2021

This just came up for Dart too:

Dart-Code/Dart-Code#3670

Dart registers a bunch of trigger characters and because we can't make them conditional based on context, we check them on the server and return 0 completions if the context didn't make sense (for example, when / is the trigger, we won't return anything unless the location is within an import path). Of course, snippets can't do this.

The comments in #37166 suggest that snippets should only be showing up if the snippet starts with the trigger character, but that doesn't seem to be what's happening here.

@hediet
Copy link
Member

hediet commented Nov 22, 2021

Yes we register ' as a trigger character for import paths:

But this still works in stable. Has there been a recent change here?

@jrieken
Copy link
Member

jrieken commented Nov 22, 2021

Yeah - there was a change in how prefixes to compare snippets against are determined. This is the PR: #136210. The challenge with snippets is that their insert positions aren't as well defined as with language completions. I have relaxed the rules and now more unwanted snippets show, esp after trigger characters. I am planning to fix this for November

@jrieken jrieken added bug Issue identified by VS Code Team member as probable bug and removed typescript Typescript support issues labels Nov 23, 2021
guibber pushed a commit to guibber/vscode that referenced this issue Nov 30, 2021
@alexr00 alexr00 added the verified Verification succeeded label Dec 2, 2021
@github-actions github-actions bot locked and limited conversation to collaborators Jan 7, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug insiders-released Patch has been released in VS Code Insiders snippets suggest IntelliSense, Auto Complete under-discussion Issue is under discussion for relevance, priority, approach verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

8 participants
@mrhyde @DanTup @jrieken @hediet @mjbvz @alexr00 @tjx666 and others