snipsnapdev / snipsnap Goto Github PK
View Code? Open in Web Editor NEWSpeed up your development with a powerful set of tools
Home Page: https://templates.snipsnap.dev/
License: GNU Affero General Public License v3.0
Speed up your development with a powerful set of tools
Home Page: https://templates.snipsnap.dev/
License: GNU Affero General Public License v3.0
I have multiple projects (Project1, Project2, Project3 etc.) under one workspace. Snipsnap automatically creates file in: Project1/.vscode/snipsnap.code-snippets
and fetches information based on package-json.
located in Project1.
So available snippets are based only on package.json
from Project1. What if I need snippets based on packages
from Project2, Project3, which are not included in Project1 package.json
?
.vscode
file will not solve the problem. No direct package.json
in the parent folder..vscode
file seems a bit redundant.Hello,
I was wondering if you had any plan to add support for Intelliji IDE ?
Keep up the great work !
Would be great to be able to create folders in "My templates" to group them up.
Add an option to set default values to the prompts.
Just add an extra field below the variable name input
Default values for prompts will be used two ways:
When trying to create a new template within a group I've already shared, I get the following error:
Failed to create template:
the key 'query' was not present: {"response":{"errors":[{"extensions":{"path":"$","code":"parse-failed"},"message":"the key 'query' was not present"}],"status":200},"request":{"variables":{"templateId":"01821073-6592-4ed3-9da1-3b3298b44326","shareToUserEmail":"","shareByUserId":"b51e17dc-cd0b-4b78-9e29-f09b63090b4a"}}}
Note: I've hidden the email with
I used Snipsnap on a Vue and Nuxt project and I have realised that snippets do not work in the script section of a component. Can you please have a look at this? Thanks.
Impressive work so far.
Hi, firstly thanks for this awesome project!
I would like to ask, are you also planning to support some native javascript snippets? For example console.log
, destructuring const { variable } = obj
, loops and so on. Snippets that are not part of any library just vanilla JS.
I could even create a pull request, I 'm just not sure if that's something that you would like to support as well.
Thanks.
Currently the snippets only work in .js
files. It would be nice to have them work in {.ts|.tsx}
files as well. It would be great if the snippets would be typed as well
"Snippets successfully fetched" notification is kinda annoying. I find any notifications in VSCode annoying unless they're errors though so maybe that's just me...
Hey guys, love the extension. I wrote a simpler version because I had the same need as this kylewetton.boxed-components
Just testing out the cloud ui now, and I've run across two small bugs
Say I have two templates: Template A
and Template B
.
Template A
and start making changes. Realise that you don't need Template B
any more, delete Template B
in the left sidebar. All the changes you've done to Template A
will disappear.{{componentName}}
. Realise it needs to be {{componentName}}.tsx
. I can't rename a file, I have to create a new one and copy/paste all the code over.Keep up the great work.
May I start on the golang? I would love to collab with anyone via live share
Is someone working on Laravel 7 support?
I have a bunch of my own snippets from some internal libraries that we use on a project. Can I create them with this tool ?
Let's keep this issue for gathering requests for snippets for certain libraries and our plans. The issue is the great candidate for good first issue initiative and could be very good for people who are interested in open source contributions. If you know the library that you would like to create snippets for, don't hesitate and leave a comment below.
JS is valid TS so there's no reason, IMO, not to just extend the files in which the extension works
Hello great idea. Like this library already.
What do you think of exchanging the import React from react to import * as React.
This removed a additional wrapper added by the bundler and since it's a snippet it does not come with additional cost for this repo.
It could be useful to have "Clone" button not only for templates available over Marketplace but as well for every template you have access to.
We can add it as a part of the context menu in the sidebar templates navigation
The code that we use for "Clone" in the marketplace should work for this action too, probably with just minor adjustments.
Hi! thank you this awesome extension!
I would like to request support for yarn workspaces.
Using something like https://github.com/react-workspaces/react-workspaces-playground means that this extension does not suggest any templates since it doesn't find React on the parent package.json
Regards,
Edelf
I can rename folders but files in Snipsnap editor UI.
hi, Guys, Snipsnap is an awesome extension. Now I maintenance my SnipSnap templates in my Github Repository because the template's online editing is boring.
But I need to upload my Fold to the https://templates.snipsnap.dev/ website. Any plan to support automatically update user's template via Github Actions?
Regards. π
That issue contains plans for the upcoming v1.2.0. Feel free to comment and suggest features that should be included for the release.
The command for getting the list of available snippets
It should be useful to know what snippets are available for the specific project you are in now. The more libraries we will have the more complicated will it be to know what snippets are there to use. To solve this issue I guess we will have to add extra endpoint on the backend that will provide a list of libraries that available for the project. We could solve it on the client-side too by reading snipsnap.code-snippets file, so have to discuss what will be the better way.
Create snippets generator
We aim to build a page that will help users and ourselves to create snippets. Snippets will have a form with all required/optional fields, validation rules that we use, prettier, list of most popular scopes for snippets.
Other things that I have in mind but not sure about their priority:
Hey, awesome work! I love the idea of this and am considering adding it to my boilerplates and even using it as an entry point for boilerplates. Is it possible to customize the location of .snipsnapignore.json? I already have way too many files in my project's roots as it is so it would be nice to be able to customize the location.
I tried Snipsnap with my hobby projects and found that Snipsnap didn't work as expected with monorepo projects.
Do you have any plan to support monorepo projects ?
We have syntax highlight for different languages but Go is not one of them. It should be a very simple task, since it will require just importing an extra highlight theme for ACE editor.
Will this Extension support Angular in the future?
For the tool is good both react and node but I still need sql so add sql snippet maybe make app better? This for feature request
I've installed snipsnap from vscode marketplace and the extension is enabled globally. However up on opening any new project this folder called .vscode
gets automatically created with a file name snipsnap.code-snippets
. Is this a feature? I have been using other snippets extensions in the past which are enabled globally but doesn't create this type of folders or anything. Why is this file needed?
This is what says upon opening up any new project in vs code:
Is there a way to stop this from hapenning? Or shall we always need to add this to .gitignore
which will be very repetitive to do?
In case of any mistakes in the template body between {{}},
I don't get any errors in the editor but Snipsnap VS code extension won't generate any files. I suggest adding validation to editor UI to prevent such occasions.
For example, gatsby-link
doesn't work inside jsx because it doesn't have that scope. I think jsx should be the only scope for such snippets, i.e.:
"gatsby-link": {
"scope": "jsx",
"prefix": ["gatsby link"],
"body": ["<Link to=\"${1:/blog}\">${2:Text}</Link>"]
},
Hey guys, love the extension. I wrote a simpler version because I had the same need as this kylewetton.boxed-components
Just testing out the cloud ui now, and I've run across two small bugs
Say I have two templates: Template A
and Template B
.
Template A
and start making changes. Realise that you don't need Template B
any more, delete Template B
in the left sidebar. All the changes you've done to Template A
will disappear.{{componentName}}
. Realise it needs to be {{componentName}}.tsx
. I can't rename a file, I have to create a new one and copy/paste all the code over.Keep up the great work.
How to COMPLETELY clean my snippets after using this extension?
Disabling doesn't help
Uninstall doesn't help
This is an un-useful extension for me personally: installed a ton of snippets that I'll never need and now I need to somehow remove them
Let say, in snipsnap template we got hello.js
file and the same file locally. Then we try to "Create from Template".
Currently, snipsnap will replace the file. I believe it should be asked from the user to either replace or keep existing files.
I will summarize here tasks and their priorities that will be included into the v1.1.0 release. All tasks placed in the order of their priority.
@angular/common
. #28Support dependencies that use submodules
There is a proposal to just cut off everything after the / and remove special symbols from names. So in that case @angular/common could be converted as angular
and we will be able easily to fetch the snippets for it.
Add the ability to define some base/default snippets
For any language, there will be some generic construction that probably won't be cover by IDE. Since we aim to be the only one installed snippets extension, having such snippets is crucial. We can define names such as "base" or "default" and those snippets to every search query. It could be done even on the server-side
https://github.com/snipsnapdev/snipsnap-api/blob/master/src/routes/snippets/list.js#L45
Write custom yarn.lock parser
Yarn developers for some reason decide to create their own format instead of using just a JSON as NPM does. Their existing official package for parsing does not work in production builds, so probably it will be faster just to write our own parser for this to extract library's names, that's all that we need at this moment.
It used to work fine 2-3 days ago but now when I create my react components the PascalCase doesn't apply and only the first letter is capital.
When do you share group or specific template, we need to be able define permissions "read" or "write". In case user have write permissions, he can also modify that template, otherwise there should not be an option to edit it.
Let's add here dropdown with permissions options, I will provide design later on.
Also we should indicate it here with the name
In order to do this task, we should add an extra field to shared_templates/shared_groups tables that will define permissions for shared object. Also, we will need to modify permissions in Hasura the way that user who has write permissions can actually modify the template.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. πππ
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google β€οΈ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.