Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Set of preconfigured snippets for different languages.

License

NotificationsYou must be signed in to change notification settings

coder054/friendly-snippets

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Snippets collection for a set of different programming languages.

The only goal is to have one community driven repository for all kinds ofsnippets in all programming languages, this way you can have it all in oneplace.

Install

Use your plugin manager of choice, e.g.

With Lazy.nvim

{"rafamadriz/friendly-snippets"}

Warning

If you're using LuaSnip make sure to userequire("luasnip.loaders.from_vscode").lazy_load(), and addfriendly-snippets as a dependency for LuaSnip, otherwise snippets might notbe detected. If you don't uselazy_load() you might notice a slowerstartup-time

{"L3MON4D3/LuaSnip",dependencies= {"rafamadriz/friendly-snippets"},}

With Packer

use"rafamadriz/friendly-snippets"

With vim-plug

Plug"rafamadriz/friendly-snippets"

With coc.nvim

:CocInstall https://github.com/rafamadriz/friendly-snippets@main

Usage

This collection of snippets should work with any snippet engine that supportsloading vscode snippets. Like for example:

Add snippets from a framework to a filetype.

Note

This is handled by your snippet engine and has nothing to do with this snippets collection

There's extra snippets included in this repo but they are not added by default,since it would be irrelevant for people not using those frameworks. Seesnippets/frameworks

For example: if you want to add rails snippets to ruby.

With LuaSnip:

require'luasnip'.filetype_extend("ruby", {"rails"})

With vim-vsnip:

letg:vsnip_filetypes.ruby= ['rails']

Excluding snippets

Note

This is handled by your snippet engine and has nothing to do with this snippets collection

With LuaSnip, seehelp luasnip-loaders

-- will exclude all javascript snippetsrequire("luasnip.loaders.from_vscode").load {exclude= {"javascript"},}

Showcase

HTML

HTML gif

JS

JS gif

TODO

  • Add all included snippets to theWiki.

Thanks to all contributors

Credits

A good portion of the snippets have been forked from the following repositories:

About

Set of preconfigured snippets for different languages.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Lua100.0%

[8]ページ先頭

©2009-2025 Movatter.jp