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

Add an option to enable/disable JSDoc autocomplete #23704

Merged
merged 6 commits into from
Apr 3, 2017
Merged

Add an option to enable/disable JSDoc autocomplete #23704

merged 6 commits into from
Apr 3, 2017

Conversation

jsynowiec
Copy link
Contributor

@jsynowiec jsynowiec commented Mar 30, 2017

Hopefully addresses #23642

This PR introduces a new settings option for TypeScript extension:

"jsDocCompletion.enabled": {
  "type": "boolean",
  "default": true,
  "description": "%jsDocCompletion.enabled%"
}

which allows to enable or disable expanding /** using docCommentTemplate tsserver command. When set to false the default SnippetString is used.

mar-31-2017 12-37-02

Jakub Synowiec added 4 commits March 31, 2017 00:36
- remove internal command
- move TS service call and template generation to CompletionItem
- only call TS service if JSDoc completion is enabled in settings
- add local config and config update method to CompletionProvider
Register JsDocCompletionHelper and update configuration in registerProviders instead of activate. Also react to configuration change.
@mention-bot
Copy link

@jsynowiec, thanks for your PR! By analyzing the history of the files in this pull request, we identified @dbaeumer and @egamma to be potential reviewers.

@msftclas
Copy link

@jsynowiec,
Thanks for your contribution.
To ensure that the project team has proper rights to use your work, please complete the Contribution License Agreement at https://cla.microsoft.com.

It will cover your contributions to all Microsoft-managed open source projects.
Thanks,
Microsoft Pull Request Bot

@msftclas
Copy link

@jsynowiec, thanks for signing the contribution license agreement. We will now validate the agreement and then the pull request.

Thanks, Microsoft Pull Request Bot

@jsynowiec
Copy link
Contributor Author

Ok, I now see why it was done using an internal command. Reading docs and looking into other ways of restoring the previous behavior rather than immediately resolving the CompletionItem without showing the item preview. All ideas are welcome.

Restores internal command but but as a separate class. Registers command on extension activation.
@jsynowiec
Copy link
Contributor Author

Hopefully all should be OK now.

@chrmarti
Copy link
Contributor

@jsynowiec Thanks for the PR! We're currently finishing the upcoming release and will look into it some time next week.

@mjbvz mjbvz added this to the April 2017 milestone Apr 3, 2017
@mjbvz mjbvz merged commit 70e074a into microsoft:master Apr 3, 2017
@mjbvz
Copy link
Contributor

mjbvz commented Apr 3, 2017

Thanks @jsynowiec! This looks like a good change. It came in a little late for the upcoming March release but it should be in the April insiders builds once those resume and in the 1.12 release

@jsynowiec jsynowiec deleted the feature/jsdoc-autocomplete-setting branch April 3, 2017 18:57
@github-actions github-actions bot locked and limited conversation to collaborators Mar 27, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants