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

User defined snippets #6356

Closed
1 task done
gldtn opened this issue Nov 2, 2023 · 1 comment
Closed
1 task done

User defined snippets #6356

gldtn opened this issue Nov 2, 2023 · 1 comment
Labels
editor Feedback for code editing, formatting, editor iterations, etc feature [core label] setting Feedback for preferences, configuration, etc

Comments

@gldtn
Copy link

gldtn commented Nov 2, 2023

Check for existing issues

  • Completed

Describe the feature

I did a quick search and did not see such feature request, so pardon if I missed it!

So I see that this can be implemented by extending the LSP language server or at least for RUST as of now, but that would make the user config get out of hand real quick. I was thinking of something a bit more like vscode has a separate user defined snipped .json file for each language like "php.json" and the user would be able do define it there,

If applicable, add mockups / screenshots to help present your vision of the feature

Here is the vscode "php.json" default file as example..

{
	// Place your snippets for php here. Each snippet is defined under a snippet name and has a prefix, body and 
	// description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are:
	// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. Placeholders with the 
	// same ids are connected.
	// Example:
	// "Print to console": {
	// 	"prefix": "log",
	// 	"body": [
	// 		"console.log('$1');",
	// 		"$2"
	// 	],
	// 	"description": "Log output to console"
	// }
}
@gldtn gldtn added admin read feature [core label] labels Nov 2, 2023
@JosephTLyons JosephTLyons added editor Feedback for code editing, formatting, editor iterations, etc setting Feedback for preferences, configuration, etc and removed triage labels Nov 3, 2023
@JosephTLyons
Copy link
Collaborator

Hey @gldtn, I think this issue might cover what you are asking for (I had trouble finding it myself, and I knew it existed):

Going close this out, but feel free to reopen if that other issue doesn't describe the same thing you are wanting.

@JosephTLyons JosephTLyons transferred this issue from zed-industries/community Jan 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
editor Feedback for code editing, formatting, editor iterations, etc feature [core label] setting Feedback for preferences, configuration, etc
Projects
None yet
Development

No branches or pull requests

2 participants