-
Notifications
You must be signed in to change notification settings - Fork 29.4k
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
Don't try to content assist in comments #1657
Comments
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. |
I am hitting an issue in comments that is ugly. My intent is to write this inside a TS/JS file:
However
Typing undo here I end up with:
@alexandrudima fyi about the undo behaviour here which is not very helpful. |
We should not add snippets inside comments, tho I am unsure if we know that when inserting them. |
@alexandrudima nice thanks! |
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. |
yeah, #580 is about scopes et al - we don't have it yet in the ext host |
@jrieken Should we try to make the IntelliSense request pass in the scopes besides the position? |
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 |
It would also be nice to not have a leading |
@andy-hanson For jsdoc that should actually happen. |
@jrieken It does not for PHPDoc and I believe also not for JavaDoc. |
for sure not |
|
Pada 19/01/2016 1:22 PG, "Andy Hanson" notifications@github.com menulis:
|
From #580 (comment)
I would like |
I think the real issue is that 24x7 IntelliSense shouldn't be active in all cases, esp when a 'smart' completion provider is there but didn't produce a result. In such cases the textual provider should only become active if explicitly invoked (Cmd+Space). |
👍 and this should be the default behaviour. We could still provide a setting 'always include textual completions' for users that like the current behaviour. |
agreed |
An alternative idea is to configure what Enter should do when completions are shown. We could add an option to accept a completion on Tab only (ala |
@jrieken 👍 on the |
@jrieken So was the decision not to do this:
For the Go plugin, I know there are a number of users who would have liked that default behaviour (not showing completion lists with textual completion and snippets automatically when the Go completion provider has returned no results, only on cmd+space). The It seems like the ultimate fix here is addressing a different problem than the core concern. The suggestion you proposed in the quote above seems to fix the core concern. |
We made this decision basically because we don't want to step onto the toes of those that actually like textual completions everywhere. Also it wouldn't have helped in cases in which only textual completions are available, esp in markdown files. Last, it's aligned with what other editors do, so with muscle memory of those users. |
Verified setting |
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. |
Searching for 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. |
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 @natefinch did above. This is really annoying! |
Ah that's a shame. Guess I just have to disable it manually. :( |
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 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 ? |
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). |
This is spectacular, since it was something that wasn't possible yet earlier in the thread. Awaiting the January release with bated breath. 😄 |
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): "editor.wordBasedCompletion": true,
"[markdown]": {
"editor.wordBasedCompletion": false
} |
I have also reopened this issue for the following change: In addition to the plain boolean that // nowhere
"editor.wordBasedCompletion": false,
// everywhere
"editor.wordBasedCompletion": true,
// somewhere
"editor.wordBasedCompletion": {
"inStrings": true,
"inComment": false,
"inCode": true
} |
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:
|
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! |
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.
The text was updated successfully, but these errors were encountered: