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 a way to edit/disable snippets. #3083

Closed
Stypox opened this issue Jan 24, 2019 · 6 comments
Closed

Add a way to edit/disable snippets. #3083

Stypox opened this issue Jan 24, 2019 · 6 comments
Labels
Feature Request fixed Check the Milestone for the release in which the fix is or will be available. Language Service quick fix regression A bug that didn't exist in a previous release
Milestone

Comments

@Stypox
Copy link

Stypox commented Jan 24, 2019

Since commit c727cec snippets can't be neither edited nor disabled.
I use my personal snippets for C/C++, because I don't like the style used in the extension's snippets, so I disabled them using the C_Cpp.ToggleSnippets command.

I know snippets suggestion have recently been moved from cpp_snippets.json to the lexer (hardcoded) (see #2942 and #2945). I suggest that you put them in a configuration json file, where they can be edited/disabled (but NOT added, for that vscode has its own file). The lexer could then parse that file and do context-aware suggestions as it did before.

@sean-mcmanus sean-mcmanus added Feature Request help wanted Can be fixed in the public (open source) repo. labels Jan 24, 2019
@sean-mcmanus sean-mcmanus added this to the Triage milestone Jan 24, 2019
@sean-mcmanus
Copy link
Contributor

sean-mcmanus commented Jan 24, 2019

Snippets can be disabled via the editor.snippetSuggestions to "none", but that would apply to all snippets (not what you want).

Yeah, it seems like we should add a setting to enable configuration of the snippet source, e.g. C_Cpp.snippetsSource "Disabled", "LanguageServer", "Custom", and a C_Cpp.customSnippetsPath to the cpp_snippets.json users want to use.

At the very least, we need a disable option so that users can get snippets via installing a different VS Code snippets provider.

@sean-mcmanus sean-mcmanus added the regression A bug that didn't exist in a previous release label Jan 24, 2019
@sean-mcmanus sean-mcmanus modified the milestones: Triage, February 2019 Jan 25, 2019
@sean-mcmanus sean-mcmanus self-assigned this Jan 25, 2019
@sean-mcmanus sean-mcmanus added the fixed Check the Milestone for the release in which the fix is or will be available. label Feb 5, 2019
@sean-mcmanus sean-mcmanus removed their assignment Feb 5, 2019
@sean-mcmanus sean-mcmanus removed the help wanted Can be fixed in the public (open source) repo. label Feb 5, 2019
@Rietty
Copy link

Rietty commented Feb 6, 2019

Just cause I can't seem to find the info anywhere else, what's the release cycle for new updates generally? 6 weeks? Or are the iterations shorter? Just curious when I can expect this and future changes in.

@sean-mcmanus
Copy link
Contributor

@Rietty We plan to release this fix in an Insiders this week. The non-Insiders might not be till March (i.e. 6 weeks from the previous release). You can check https://github.com/Microsoft/vscode-cpptools/releases for our previous update schedules.

@Rietty
Copy link

Rietty commented Feb 6, 2019

@sean-mcmanus Thanks for the reply. Good to know. Might switch to Insiders just for this then.

@sean-mcmanus
Copy link
Contributor

We added a "C_Cpp.suggestSnippets" that you can set to false with 0.22.0-insiders. You can get it via setting the C_Cpp.updateChannel setting to "Insiders", or downloading it manually from https://github.com/Microsoft/vscode-cpptools/releases .

Is that sufficient? It should enable you to use another snippet provider to paste in the old snippet file we used to use.

@Stypox
Copy link
Author

Stypox commented Feb 8, 2019

Yes, that will do for me, thanks :-)

@github-actions github-actions bot locked and limited conversation to collaborators Oct 11, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Feature Request fixed Check the Milestone for the release in which the fix is or will be available. Language Service quick fix regression A bug that didn't exist in a previous release
Projects
None yet
Development

No branches or pull requests

3 participants