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

Define and use custom code snippet like in vscode #2320

Closed
3 tasks done
ascodeasice opened this issue Dec 28, 2023 · 1 comment
Closed
3 tasks done

Define and use custom code snippet like in vscode #2320

ascodeasice opened this issue Dec 28, 2023 · 1 comment
Assignees
Labels
conclusion: off topic Off topic for this repository topic: code Related to content of the project itself type: enhancement Proposed improvement

Comments

@ascodeasice
Copy link

Describe the request

Code snippet is a feature in vscode, that allows user to create template code by typing defined texts, ex: #endregion becomes #pragma endregion.

The request is allowing user to define their own snippet in a JSON file, such as lcdInit creates three lines of code initializing LCD (just like vscode).

So, I hope I can:

  1. define snippets in a file
  2. get suggested when typing, and select them, then defined code will appear

This feature would be useful when writing some repeated code with certain template

Describe the current behavior

I couldn't find such setting in the command palette or setting, but in vscode, it can be found in command palette, so I think this feature doesn't exist yet.

Arduino IDE version

2.2.2-nightly-20231228

Operating system

Windows

Operating system version

Windows 11 22H2

Additional context

Snippets in Visual Studio Code (document)

Issue checklist

  • I searched for previous requests in the issue tracker
  • I verified the feature was still missing when using the latest nightly build
  • My request contains all necessary details
@ascodeasice ascodeasice added the type: enhancement Proposed improvement label Dec 28, 2023
@per1234 per1234 self-assigned this Dec 28, 2023
@per1234 per1234 added the topic: code Related to content of the project itself label Dec 28, 2023
@per1234
Copy link
Contributor

per1234 commented Dec 28, 2023

Hi @ascodeasice. Thanks for your suggestion. This feature has already been requested for addition to the Eclipse Theia IDE framework upon which Arduino IDE is built: eclipse-theia/theia#3686

Since it is already tracked in the Theia project, and since Arduino IDE will inherit user snippets support as a matter of course once it has been implemented in Theia, I will close this issue as superfluous.

@per1234 per1234 closed this as not planned Won't fix, can't repro, duplicate, stale Dec 28, 2023
@per1234 per1234 added the conclusion: off topic Off topic for this repository label Dec 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
conclusion: off topic Off topic for this repository topic: code Related to content of the project itself type: enhancement Proposed improvement
Projects
None yet
Development

No branches or pull requests

2 participants