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

Suggestions in comments on trigger characters despite setting #25109

Closed
dbogatov opened this issue Apr 21, 2017 · 7 comments
Closed

Suggestions in comments on trigger characters despite setting #25109

dbogatov opened this issue Apr 21, 2017 · 7 comments
Assignees

Comments

@dbogatov
Copy link

  • VSCode Version: 1.11.2
  • OS Version: macOS 10.12.4

Steps to Reproduce:

  1. Install C# extension
  2. Set:
"editor.quickSuggestions": {
    "other": true,
    "comments": false,
    "strings": false
  },
  1. In .cs file write a block comment like this:
/// <summary
/// Checks that Index method returns proper model and status codes.
/// </summary>
  1. Put dot in comment (at the end)

Expected

Nothing shows up

Actual

Silly suggestion (!--) shows up

@mjbvz mjbvz added the suggest IntelliSense, Auto Complete label Apr 21, 2017
@mjbvz
Copy link
Collaborator

mjbvz commented Apr 21, 2017

Thanks @Dima4ka! I believe that I was also able to reproduce this issue in TypeScript

@jrieken jrieken added the under-discussion Issue is under discussion for relevance, priority, approach label Apr 21, 2017
@jrieken
Copy link
Member

jrieken commented Apr 21, 2017

Yes. That is the design because trigger characters still have a purpose there, think of @ completions for doc comments as in /** @param <suggests foo-param>. Unsure what !-- is but my guess is that it's a snippet, right @Dima4ka ?

@jrieken jrieken added the info-needed Issue requires more information from poster label Apr 21, 2017
@dbogatov
Copy link
Author

dbogatov commented Apr 21, 2017

@jrieken No, it was not snippet, it is rather "abc" guess (not intelligent). Looks like part of the HML comment <!-- comment -->. Anyway, although I appreciate Intellisence in comments, it is annoying when I type a line of text, hit dot to complete my sentence, hit Enter to move to the new line and it turns out that I have typed random piece of text.

. is supposed to help with class methods and properties mostly. Maybe it would make sense to have different "trigger characters" for comments and code.

@jrieken
Copy link
Member

jrieken commented Apr 24, 2017

screen shot 2017-04-24 at 08 51 46

No 'ABC' icon for me, but the keyword icon. My guess is that this is coming from the C# extension. @DustinCampbell Ideas?

@DustinCampbell
Copy link
Member

Note that in C#, XML documentation comments aren't precisely "comments". They're very special. Also, in the example, the <summary> isn't closed, so in a sense, you're tying in a tag and not in the comment itself, which is why these keywords would be suggested (contextually). That said, it's clearly a bug that typing a period makes completion appear here. That shouldn't happen. This bug should probably be moved to omnisharp-vscode.

@jrieken, we're starting to get into territory that it is pretty tricky to get make correct for C# without a little help from VS Code's completion API to let us know how completion was triggered. C# completion can do different things depending on what the user did. Knowing whether the user triggered completion by typing the last character that appears in the document or whether they typing Ctrl+Space can be important.

@jrieken
Copy link
Member

jrieken commented Apr 24, 2017

Yeah, this has come up before (#752) but hasn't been tackled yet. It's a little harder to do without breaking the API because we want to keep the rule "CancellationToken comes last"...

I'll move the issue to vscode-omnisharp to begin with ;-)

@jrieken jrieken removed info-needed Issue requires more information from poster suggest IntelliSense, Auto Complete under-discussion Issue is under discussion for relevance, priority, approach labels Apr 24, 2017
@jrieken
Copy link
Member

jrieken commented Apr 24, 2017

This issue was moved to dotnet/vscode-csharp#1424

@jrieken jrieken closed this as completed Apr 24, 2017
@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
None yet
Projects
None yet
Development

No branches or pull requests

4 participants