From 8256745fa20fbf0aadcce7afaad9377361596e9a Mon Sep 17 00:00:00 2001 From: Thierry Delafontaine Date: Thu, 3 Mar 2022 19:31:10 +0100 Subject: [PATCH] Added installation instructions for VSCode and vim/nvim. --- README.md | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/README.md b/README.md index 2012589..0169384 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,49 @@ Currently, this collection provides snippets for the InES file headers in C/C++ and VHDL. More snippets will be added when they get requested or I when I encounter them. +## Installation + +### VSCode + +Install the extension from the extension market. + +### Vim/Neovim +This plugin only provides snippets. Therefore, you need a plugin that provides +snippet features and supports loading VSCode snippets. + +For example: + +- [vim-vsnip](https://github.com/hrsh7th/vim-vsnip) +- [LuaSnip](https://github.com/L3MON4D3/LuaSnip) +- [coc-snippets](https://github.com/neoclide/coc-snippets) + +Use your plugin manager to install the package. + +```lua +-- Packer +use "rafamadriz/friendly-snippets" +``` + +```vim +-- Plug +Plug 'rafamadriz/friendly-snippets' +``` + +``` +-- coc.nvim +CocInstall https://github.com/InES-HPMM/zhaw-snippets@main +``` + +[vim-vsnip](https://github.com/hrsh7th/vim-vsnip) will automatically detect and +load the snippets. In [LuaSnip](https://github.com/L3MON4D3/LuaSnip) you will +have to call + +```lua +require("luasnip.loaders.from_vscode").load() +-- or to lazy load the snippets +require("luasnip.loaders.from_vscode").lazy_load() +``` + ## Snippets | Snippet | Purpose | Available in |