developer-grants icon indicating copy to clipboard operation
developer-grants copied to clipboard

Snippets

Open bjartek opened this issue 1 year ago • 7 comments

Snippets

Grant category

Please select one:

  • Developer tools / services

Description

Problem statement

Snippets is a fantastic tool to ease the work of developing. VS Code has a rich set of snippets for various languages but nothing for flow. This grant aims to fix that.

Proposed solution

Impact

Easier to code, reuse best practises in the IDE

Milestones and funding

Note: Please consider adoption and/or maintenance milestones at the end of your project.

Milestone Deliverables Timeline Risks USD proposal
1 - Gather information document 2 weeks In order to know what snippets are needed it is important to talk to the community first and also analyze existing code to know what to add 3000
2 - Implementation extension/repo 4 weeks Implement snippets in a github repo and either hand it of to be included in the official vs code plugin or add a separate snippets plugin for code 7000

Total funding proposed: 10000

Team

Name Role Bio Contact
Bjarte Karlsen Code-monkey I sling code and have fun and help some people too [email protected]

bjartek avatar Jan 25 '24 16:01 bjartek

An example video on the power of snippets https://www.youtube.com/watch?v=RMOkYdKxelY

I have a PoC repo with this already but have not spent the effort on gathering it all since I wanted to gauge the interest for this.

bjartek avatar Jan 25 '24 16:01 bjartek

PoC repo https://github.com/bjartek/cadence-snippets/tree/main

bjartek avatar Jan 25 '24 16:01 bjartek

Great to see these useful snippets!

It would be nice if the snippets could be added to the existing set of snippets that we have in the language server (see https://github.com/onflow/cadence-tools/blob/master/languageserver/server/server.go). That way all IDEs/editors that support the Language Server Protocol could make use of them, including VS Code and the Playground.

turbolent avatar Jan 25 '24 18:01 turbolent

That is a bit out of scope for this grant but it can be a follow up one maybe? Or add a new milestone?

I did not know these where there so i have to look at my ide setup and see how i can get them to work.

Doing duplicate work here is not needed for sure.

bjartek avatar Jan 25 '24 19:01 bjartek

In what format / for what tools do you plan to provide the snippets?

turbolent avatar Jan 25 '24 21:01 turbolent

The plan was to use the json file in my example repo since that is what code supports. But reading about lsp snippets that might be better. I think i need to study some more.

bjartek avatar Jan 25 '24 21:01 bjartek

It looks like LSP snippets really can mimic a lot of what native snippets can do and adding them to the servers should not be that hard so it might be possible to use that in goal 2 instead of code plugin.

bjartek avatar Jan 25 '24 22:01 bjartek