You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Don't try to content assist / perform intellisense when writing a comment. Really really annoying, when every other word pops up suggestions. Don't want it.
Dupe of #538 that got closed but not fixed really though.
Reacted by Nate Finch, Ahmet Alp Balkan, Zach Bjornson, Kashev Dalmia, Paolo Furini, Maksim Kurnikov, Justin T. Zeng, Darren Cook, Andy Kish, scrudgey and 1 more
Imo word suggestions are often quite helpful. For example when I make a comment like "this is later called by ..." and VS Code automatically suggests the long method name as I type.
@fleixfbecker yes, but 'code' within comments should be escaped with backticks, the intellisense whilst writing comments is really slowing down my typing and interfering with expected spc/tab when writing prose.
A set of 'scopes' / 'escapes' could be provided for comments, primarily that triple slash enables a 'line of code' within a comment, where intellisense could be available.
That makes it related to #1172 which is about adding more contextual information to the provider. Two other options that I favour is either something like TextDocument.scopesAtPosition/Offset or the extend the document selector to know about scopes { language: 'javascript', scopes: 'comment.doc' }. The latter might be easiest to implement since it's evaluated on the main side
FWIW, I also find this to be super annoying. I've never seen another editor suggest random words from the file when typing comments. It's distracting and unhelpful. I'm fine with having to set a value to turn it off, but please give me that ability... and I mean turning off suggestions in comments entirely.
I'm not sure why this issue is marked as closed... unless I'm missing something, there's been no proposed workaround for the problem of showing suggestions, only for turning off autocomplete on enter, which is more of a symptom than the actual disease.
Reacted by Juhász Péter, Nicholas Narsing, sorear, Ryan Lovelett, Ahmet Alp Balkan, Andrea Di Giorgi, Zach Bjornson, Matt Baker, Thomas Boyt, abgivant and 17 more
Searching for turn off suggestion in text files vscode I get to #3137 which is closed as a dupe of #2496 which is closed as a dupe of this issue which... doesn't help me disable suggestions in a specific file format.
Reacted by Timon van Spronsen, Christian Esser, martinpllu, Taylor Brown, Drumanagh Wilpole, M0rtenB, Stanislav Natalenko, Darren Cook, jessewatson, JesperTreetop and 3 more
When I hit the enter key to start a new line in a comment, the editor often "helpfully" completes my sentence with something I don't want. I don't think I could put it any better than Nate Finch (@natefinch) did above. This is really annoying!
Could someone, who knows the code, suggest where a patch would go, and how it might work?
I guess we need a boolean function that will ask isCursorInsideAComment(), or getCursorContext() might be better, so we can distinguish between single-line comments, block comments, and javadoc comments (start with /**).
And then use that function (*) at the point where it decides if to show intellisense suggestions or not. I think the answer to the latter might be related to #1172 ?
*: based on a user setting, of course, so people who want to write code inside comments still can.
Per the other comments, please reopen this or allow one of the "dupe" issues to be opened for the benefit of those of us who don't want random word autocomplete when editing text files. Since editing Markdown files is one of the intended uses of Visual Studio Code to the extent that it gets special features like live preview, I think this deserves not to be clumped together with disabling autocomplete within comments (which is probably still a good idea).
For those that don't want to see word-based suggestion for certain languages you can say "[markdown]": { "editor.wordBasedSuggestions": false } (available in insiders today or the January release).
This is spectacular, since it was something that wasn't possible yet earlier in the thread. Awaiting the January release with bated breath. 😄
I have also reopened this issue for the following change: In addition to the plain boolean that editor.wordBasedCompletion accepts today I want to extend it to something that allows to say word based suggestion 'in comment only', 'in string only', 'nowhere' etc. Samples:
Hey, thank you to whoever added file-type specific editor settings. Now.. can we get all file types, and not just the four that exist? I'd be happy to open a PR if someone could point me to the right area.
I'm not sure why these were the only languages that made the cut :)
EDIT: Spoke too soon!
For anyone else who finds this issue:
Go to language-specific settings (cmd + shift + P)
This will insert the correct language settings override in your settings.json, which you can then edit
The additional configuration options for word-based suggestion are now tracked in #9504 and are plan for March. Closing this issue as the remaining work will happen there. Happy Coding!
Activity
felixfbecker commentedon Dec 28, 2015
Imo word suggestions are often quite helpful. For example when I make a comment like "this is later called by ..." and VS Code automatically suggests the long method name as I type.
Kroc commentedon Dec 29, 2015
@fleixfbecker yes, but 'code' within comments should be escaped with backticks, the intellisense whilst writing comments is really slowing down my typing and interfering with expected spc/tab when writing prose.
bpasero commentedon Jan 13, 2016
I am hitting an issue in comments that is ugly. My intent is to write this inside a TS/JS file:
However
setis a snippet and typing "." completes it so I end up with:Typing undo here I end up with:
alexandrudima fyi about the undo behaviour here which is not very helpful.
jrieken commentedon Jan 13, 2016
We should not add snippets inside comments, tho I am unsure if we know that when inserting them.
alexdima commentedon Jan 13, 2016
Benjamin Pasero (@bpasero) Pushed fix for undo behavior in 2cdf977
bpasero commentedon Jan 13, 2016
alexandrudima nice thanks!
Kroc commentedon Jan 13, 2016
A set of 'scopes' / 'escapes' could be provided for comments, primarily that triple slash enables a 'line of code' within a comment, where intellisense could be available.
jrieken commentedon Jan 13, 2016
yeah, #580 is about scopes et al - we don't have it yet in the ext host
alexdima commentedon Jan 14, 2016
Johannes Rieken (@jrieken) Should we try to make the IntelliSense request pass in the scopes besides the position?
jrieken commentedon Jan 14, 2016
That makes it related to #1172 which is about adding more contextual information to the provider. Two other options that I favour is either something like
TextDocument.scopesAtPosition/Offsetor the extend the document selector to know about scopes{ language: 'javascript', scopes: 'comment.doc' }. The latter might be easiest to implement since it's evaluated on the main sideandy-hanson commentedon Jan 18, 2016
It would also be nice to not have a leading
*automatically added when I add a new line to a comment.jrieken commentedon Jan 18, 2016
Andy Hanson (@andy-hanson) For jsdoc that should actually happen.
19 remaining items
natefinch commentedon May 23, 2016
FWIW, I also find this to be super annoying. I've never seen another editor suggest random words from the file when typing comments. It's distracting and unhelpful. I'm fine with having to set a value to turn it off, but please give me that ability... and I mean turning off suggestions in comments entirely.
I'm not sure why this issue is marked as closed... unless I'm missing something, there's been no proposed workaround for the problem of showing suggestions, only for turning off autocomplete on enter, which is more of a symptom than the actual disease.
alexturek commentedon Nov 4, 2016
Searching for
turn off suggestion in text files vscodeI get to #3137 which is closed as a dupe of #2496 which is closed as a dupe of this issue which... doesn't help me disable suggestions in a specific file format.Has anyone actually solved this, or did that issue get conflated with the ability to completely disable intellisense? The docs suggest it's still not possible to disable by file format.
jimfoye commentedon Nov 18, 2016
When I hit the enter key to start a new line in a comment, the editor often "helpfully" completes my sentence with something I don't want. I don't think I could put it any better than Nate Finch (@natefinch) did above. This is really annoying!
jtzeng commentedon Dec 1, 2016
Ah that's a shame. Guess I just have to disable it manually. :(
DarrenCook commentedon Jan 26, 2017
Could someone, who knows the code, suggest where a patch would go, and how it might work?
I guess we need a boolean function that will ask
isCursorInsideAComment(), orgetCursorContext()might be better, so we can distinguish between single-line comments, block comments, and javadoc comments (start with/**).And then use that function (*) at the point where it decides if to show intellisense suggestions or not. I think the answer to the latter might be related to #1172 ?
*: based on a user setting, of course, so people who want to write code inside comments still can.
JesperTreetop commentedon Jan 31, 2017
Per the other comments, please reopen this or allow one of the "dupe" issues to be opened for the benefit of those of us who don't want random word autocomplete when editing text files. Since editing Markdown files is one of the intended uses of Visual Studio Code to the extent that it gets special features like live preview, I think this deserves not to be clumped together with disabling autocomplete within comments (which is probably still a good idea).
JesperTreetop commentedon Jan 31, 2017
This is spectacular, since it was something that wasn't possible yet earlier in the thread. Awaiting the January release with bated breath. 😄
jrieken commentedon Jan 31, 2017
re #1657 (comment): Sorry, I deleted my comment because it contained a link to the wrong issue 🙃
So, this is what I have suggested in #10819 (comment):
jrieken commentedon Jan 31, 2017
I have also reopened this issue for the following change: In addition to the plain boolean that
editor.wordBasedCompletionaccepts today I want to extend it to something that allows to say word based suggestion 'in comment only', 'in string only', 'nowhere' etc. Samples:alexturek commentedon Mar 2, 2017
Hey, thank you to whoever added file-type specific editor settings. Now.. can we get all file types, and not just the four that exist? I'd be happy to open a PR if someone could point me to the right area.
I'm not sure why these were the only languages that made the cut :)
EDIT: Spoke too soon!
For anyone else who finds this issue:
cmd + shift + P)settings.json, which you can then editjrieken commentedon Mar 8, 2017
The additional configuration options for word-based suggestion are now tracked in #9504 and are plan for March. Closing this issue as the remaining work will happen there. Happy Coding!