onflow / developer-grants

Grants for developers that contribute to the broader developer ecosystem
Apache License 2.0
50 stars 18 forks source link

Snippets #254

Open bjartek opened 10 months ago

bjartek commented 10 months ago

Snippets

Grant category

Please select one:

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 bjarte@bjartek.org
bjartek commented 10 months ago

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 commented 10 months ago

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

turbolent commented 10 months ago

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.

bjartek commented 10 months ago

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.

turbolent commented 10 months ago

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

bjartek commented 10 months ago

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 commented 10 months ago

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.