Skip to content

nvim-contrib/nvim-snippets

Repository files navigation

nvim-snippets

A curated collection of VS Code-compatible snippets for Neovim, covering multiple programming languages and testing frameworks.

test Release License Neovim

Snippets

Language Frameworks
Go Ginkgo, Gomega

Installation

Snippets are distributed in VS Code format and load via LuaSnip.

lazy.nvim (standalone)

{
  "L3MON4D3/LuaSnip",
  dependencies = {
    "nvim-contrib/nvim-snippets",
  },
  config = function()
    require("luasnip.loaders.from_vscode").lazy_load {
      paths = { vim.fn.stdpath("data") .. "/lazy/nvim-snippets" },
    }
  end,
}

AstroNvim

{
  "L3MON4D3/LuaSnip",
  dependencies = {
    "nvim-contrib/nvim-snippets",
  },
  config = function(plugin, opts)
    -- include the default AstroNvim LuaSnip config
    require("astronvim.plugins.configs.luasnip")(plugin, opts)
    -- load nvim-snippets snippets
    require("luasnip.loaders.from_vscode").lazy_load {
      paths = { vim.fn.stdpath("data") .. "/lazy/nvim-snippets" },
    }
  end,
}

Contributing

Contributions are welcome! To add or improve snippets:

  1. Fork the repository
  2. Edit or add files under snippets/<language>/
  3. Run make validate to check JSON validity
  4. Open a pull request

Snippets follow the VS Code snippet format.

License

MIT — see LICENSE.

About

VS Code-compatible Neovim snippets for Go testing with Ginkgo and Gomega

Topics

Resources

License

Stars

Watchers

Forks

Contributors