From 239513ca9dd4c067d1a3ad1b0ac40e1a677189dc Mon Sep 17 00:00:00 2001 From: Micah Halter Date: Thu, 11 Jan 2024 10:47:35 -0500 Subject: [PATCH] fix(snippets): update custom snippets instructions --- src/content/docs/recipes/snippets.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/content/docs/recipes/snippets.md b/src/content/docs/recipes/snippets.md index 2b2e604a0..7c16742a4 100644 --- a/src/content/docs/recipes/snippets.md +++ b/src/content/docs/recipes/snippets.md @@ -10,16 +10,16 @@ return { "L3MON4D3/LuaSnip", config = function(plugin, opts) -- include the default astronvim config that calls the setup call - require("plugins.configs.luasnip")(plugin, opts) + require("astronvim.plugins.configs.luasnip")(plugin, opts) -- load snippets paths require("luasnip.loaders.from_vscode").lazy_load({ - paths = { vim.fn.stdpath("data") .. "/lua/snippets" }, + paths = { vim.fn.stdpath("config") .. "/snippets" }, }) end, } ``` -Depending on the location of your configuration (typically `~/.config/nvim`), create a subdirectory named `snippets` in your `lua/` folder. +Depending on the location of your configuration (typically `~/.config/nvim`), create a subdirectory named `snippets`. Custom snippets will be added to this `snippets` directory. They will follow the vscode style as described in the [documentation](https://github.com/l3mon4d3/luasnip/blob/master/doc.md#vscode-snippets-loader) This example Vue snippet is added as `snippets/vue.json`: @@ -51,7 +51,7 @@ In order for Luasnip to see the newly added snippet, it must be cataloged in `sn ```json title="snippets/package.json" { - "name": "user snippets", + "name": "user_snippets", "engines": { "vscode": "^1.11.0" },