-
Notifications
You must be signed in to change notification settings - Fork 28.6k
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
Possible to suprress completion provider on specific token kinds? #719
Comments
Currently not possible, since we do not expose token information in the extension host (something we have lost when transitioning to textmate grammars). |
Not yet. The idea is to add scopes to
Still, this requires us to expose scopes first ;-) |
This is the only thing keeping me from using VS Code. I'm a bit sad to see this backlogged, but it's irritating enough that I hope it will be a priority. |
@mholt we have looked into this and found that a root cause of the frustration of intellisense inside comments is that textual completions are accepted to eagerly when you type RETURN. In the insider build we have therefore added support so that you can configure that completions are only accepted on TAB. Can you please give this a try? |
@egamma Hey this is great, I think it'll do quite nicely! Thanks. |
@jrieken Is #580 (comment) still a blocker for #719 (comment) ? |
Yes and no. We have boiled things down to a small set of standard tokens: comment, string, regex, and other. Those token sit in the main side, so in theory we can register providers with more info. The problem is that we don't have token information on the ext side and that we allow to evaluate a document selector there as well and that the lack of token would yield in different results... |
This issue is being closed to keep the number of issues in our inbox on a manageable level, we are closing issues that are not going to be addressed in the foreseeable future: We look at the number of votes the issue has received and the number of duplicate issues filed. More details here. If you disagree and feel that this issue is crucial: We are happy to listen and to reconsider. If you wonder what we are up to, please see our roadmap and issue reporting guidelines. Thanks for your understanding and happy coding! |
I'm trying to fix microsoft/vscode-go#103, but as far as I can tell this isn't possible currently without tokenizing the whole file again in my extension and manually checking whether I'm in a comment to suprress providing results.
It would be nice if the
CompletionItemProvider
provided a setting to suppress it's results when in certain tokens/scopes.The implementation of the TypeScript completion provider has an
excludeTokens
which seems to play this role but I can't get that to work in my own extension.The text was updated successfully, but these errors were encountered: