## Description
mini.snippets is out of beta, so I adjusted the description for the
extra accordingly
## Checklist
- [x] I've read the
[CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md)
guidelines.
---------
Co-authored-by: abeldekat <abel@nomail.com>
## Description
Mini.snippets, a plugin to manage and expand snippets, is currently in
[beta](https://github.com/echasnovski/mini.nvim/issues/1428).
I think the plugin is a very interesting alternative to `luasnip`.
The following `lazydoc` will be added:
```lua
if lazyvim_docs then
-- Set to `false` to prevent "non-lsp snippets"" from appearing inside completion windows
-- Motivation: Less clutter in completion windows and a more direct usage of snippits
vim.g.lazyvim_mini_snippets_in_completion = true
-- Using default mini.snippets, completion suggestions might appear directly after inserting a snippet
-- This extra prevents that from happening.
-- Motivation: A better display of the current snippet.
-- Also, those completions do not appear when using luasnip or native snippets
--
-- Set to `false` to enable completion suggestions directly after inserting a snippet
vim.g.lazyvim_mini_snippets_override_expand_insert = true
-- NOTE: Please also read:
-- https://github.com/echasnovski/mini.nvim/blob/main/readmes/mini-snippets.md#expand
-- :h MiniSnippets-session
-- Example override for your own config:
--[[
return {
{
"echasnovski/mini.snippets",
opts = function(_, opts)
-- By default, for opts.snippets, the extra for mini.snippets only adds gen_loader.from_lang()
-- This provides a sensible quickstart, integrating with friendly-snippets
-- and your own language-specific snippets
--
-- In order to change opts.snippets, replace the entire table inside your own opts
local snippets, config_path = require("mini.snippets"), vim.fn.stdpath("config")
opts.snippets = { -- override opts.snippets provided by extra...
-- Load custom file with global snippets first (order matters)
snippets.gen_loader.from_file(config_path .. "/snippets/global.json"),
-- Load snippets based on current language by reading files from
-- "snippets/" subdirectories from 'runtimepath' directories.
snippets.gen_loader.from_lang(), -- this is the default in the extra...
}
end,
},
}
--]]
end
```
It's possible to use the code from this PR directly in your own
configuration:
1. Copy the code to lua/extras/coding/mini_snippets.lua in your config
folder
2. Restart nvim and enable the "user" extra for `mini.snippets`
3. Restart nvim
## Checklist
- [x] I've read the
[CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md)
guidelines.
---------
Co-authored-by: abeldekat <abel@nomail.com>