-
-
Notifications
You must be signed in to change notification settings - Fork 1
Task: Add language support #3
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
base: main
Are you sure you want to change the base?
Conversation
|
Sorry @Onokaev that was by accident, you can keep on working on this PR. I wanted to actually write a comment about the snippet. Like the idea, but it might be better to add a snippet by checking which URL you have in the clipboard or is present on the current line. As typing an extra character is not the best UX in my opinion. Keep up the good work. Let me know when its finished and will be happy to review and merge it. |
|
Hey @Onokaev how did the hackathon go? How far did you get with this PR? |
|
Hey @estruyf. Hackathon was awesome! The idea is to have a different Completion provider that checks if there are any active completion items in the editor. At this point, it's safe to return a snippet completion item |
|
` export class SnippetCompletionProvider implements CompletionItemProvider { }` This is what I have tried so far, but it appears to get into an infinite loop |
|
My friend suggested another approach that still uses more characters to trigger a snippet call. The idea is to decouple the snippet completion item from the autocomplete item like so: gsn https://graph.microsoft.com/v1.0/me (This should provide snippet completion items because of the preceding gsn) |
|
I could really use more ideas :) |
|
Sure. Let me try a virtual document |

Adds language support
Notes
Powershell and Go snippet generation currently not working.
Testing instructions
After typing a URL e.g https://graph.microsoft.com/me/messages,
Add a '-' at the end of the URL to get code snippets like so: https://graph.microsoft.com/me/messages-
Press Enter or tab to populate the editor with the code snippet