From f0f759d524007cd29a2337d692afb9bc98934a22 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 12 Nov 2024 07:12:37 +0000 Subject: [PATCH] chore(build): auto-generate docs --- docs/configuration_recipes.md | 45 +++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/docs/configuration_recipes.md b/docs/configuration_recipes.md index 4811b86..741d516 100644 --- a/docs/configuration_recipes.md +++ b/docs/configuration_recipes.md @@ -239,3 +239,48 @@ config = function() end) end, ``` + +## Common Configurations + +### Luasnip and friendly-snippets + +- Optional: Install + [friendly-snippets](https://github.com/rafamadriz/friendly-snippets) +- Install [LuaSnip](https://github.com/L3MON4D3/LuaSnip) +- Install [care-cmp](https://github.com/max397574/care-cmp) +- Install [cmp_luasnip](https://github.com/saadparwaiz1/cmp_luasnip) + +
+Lazy.nvim Example + +```lua +{ + "max397574/care.nvim", + dependencies = { + "max397574/care-cmp", + "saadparwaiz1/cmp_luasnip", + "rafamadriz/friendly-snippets", + "L3MON4D3/LuaSnip", + }, + config = function() + ... + end +} +``` + +
+ +Then you can use the following configuration to use luasnip for snippet +completion and to load the friendly-snippets snippets. + +```lua +config = function() + require("luasnip.loaders.from_vscode").lazy_load() + require("care").setup({ + snippet_expansion = function(body) + require("luasnip").lsp_expand(body) + end, + ... + }) +end +```