GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com โ€” Home

Home

Jump to bottom
Nicholas O'Kelley edited this page Sep 30, 2023 ยท 16 revisions

Welcome to the friendly-snippets wiki!

Snippets collection for a set of different programming languages for faster development. This repository has been forked from a couple of VSCode Snippets extensions in addition to individual developers contributions.

Snippets list:

As the snippets get individual pages, we will update this list to redirect to them ๐Ÿ˜Ž

Markup Languages

  • CSS, Sass, Less, Stylus
  • Gitcommit
  • HTML, Pug, Jade
  • Latex
  • Markdown
  • Norg
  • Org
  • Plantuml
  • RMarkdown

Programming Languages

  • C
  • Cobol
  • Cpp
  • Csharp
  • Dart
  • eElixir
  • Elixir
  • Erb
  • Erlang
  • Fennel
  • Fortran
  • Glsl
  • Go
  • Haskell
  • Java
  • Javascript, Typescript, Javascriptreact, Typescriptreact
  • Julia
  • Kotlin
  • Liquid
  • Lua
  • Make
  • Mint
  • Objc
  • Php
  • Python
  • Quarto
  • R
  • Rescript
  • Ruby
  • Rust
  • Scala
  • Shell
  • Solidity
  • Sql
  • Swift
  • Verilog

Frameworks

  • Django
  • Docker
  • Docker Compose
  • EJS
  • Flutter
  • Jekyll
  • Kubernetes
  • Rails
  • Svelte
  • Vue
Game Engines
  • Godot (gdscript)
  • Unreal Engine

Extending Snippets

Below is an example of extending snippets, in particular making JavaScript React available for JavaScript files:

Note: This example uses nvim-cmp with Luasnip

require("luasnip").filetype_extend("typescript", { "javascript" })

For more specific implementations, see your snippet engines documentation.

Extending via lazy.nvim

-- Snippet Courtesy of @Zeioth, 

{
  "L3MON4D3/LuaSnip",
  build = vim.fn.has "win32" ~= 0 and "make install_jsregexp" or nil,
  dependencies = {
    "rafamadriz/friendly-snippets",
    "benfowler/telescope-luasnip.nvim",
  },
  config = function(_, opts)
    if opts then require("luasnip").config.setup(opts) end
    vim.tbl_map(
      function(type) require("luasnip.loaders.from_" .. type).lazy_load() end,
      { "vscode", "snipmate", "lua" }
    )
    -- friendly-snippets - enable standardized comments snippets
    require("luasnip").filetype_extend("typescript", { "tsdoc" })
    require("luasnip").filetype_extend("javascript", { "jsdoc" })
    require("luasnip").filetype_extend("lua", { "luadoc" })
    require("luasnip").filetype_extend("python", { "pydoc" })
    require("luasnip").filetype_extend("rust", { "rustdoc" })
    require("luasnip").filetype_extend("cs", { "csharpdoc" })
    require("luasnip").filetype_extend("java", { "javadoc" })
    require("luasnip").filetype_extend("c", { "cdoc" })
    require("luasnip").filetype_extend("cpp", { "cppdoc" })
    require("luasnip").filetype_extend("php", { "phpdoc" })
    require("luasnip").filetype_extend("kotlin", { "kdoc" })
    require("luasnip").filetype_extend("ruby", { "rdoc" })
    require("luasnip").filetype_extend("sh", { "shelldoc" })
  end,
},

Clone this wiki locally

You are visitor 01402792 โ€” GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800ร—600. No cookies required.