{"id":23779266,"url":"https://github.com/abeldekat/cmp-mini-snippets","last_synced_at":"2025-10-19T23:41:11.908Z","repository":{"id":270460940,"uuid":"910421783","full_name":"abeldekat/cmp-mini-snippets","owner":"abeldekat","description":"mini.snippets completion source for nvim-cmp","archived":false,"fork":false,"pushed_at":"2025-01-26T10:06:24.000Z","size":30,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-10T00:12:51.253Z","etag":null,"topics":["lua","mini-nvim","neovim","nvim-cmp"],"latest_commit_sha":null,"homepage":"","language":"Lua","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/abeldekat.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-12-31T08:22:17.000Z","updated_at":"2025-03-08T02:19:00.000Z","dependencies_parsed_at":"2024-12-31T11:18:29.760Z","dependency_job_id":"fb79501f-eee1-4402-90e7-233891e73ece","html_url":"https://github.com/abeldekat/cmp-mini-snippets","commit_stats":null,"previous_names":["abeldekat/cmp-mini-snippets"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abeldekat%2Fcmp-mini-snippets","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abeldekat%2Fcmp-mini-snippets/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abeldekat%2Fcmp-mini-snippets/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abeldekat%2Fcmp-mini-snippets/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/abeldekat","download_url":"https://codeload.github.com/abeldekat/cmp-mini-snippets/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248637832,"owners_count":21137538,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["lua","mini-nvim","neovim","nvim-cmp"],"created_at":"2025-01-01T10:16:18.586Z","updated_at":"2025-10-19T23:41:06.855Z","avatar_url":"https://github.com/abeldekat.png","language":"Lua","funding_links":[],"categories":[],"sub_categories":[],"readme":"# cmp_mini_snippets\n\nThis plugin is a completion source for [nvim-cmp],\nproviding the snippets produced by [mini.snippets].\n\n[mini.snippets] is a plugin to manage and expand snippets.\n\nCurrently, [mini.snippets] is in [beta].\n\n## Installation\n\n\u003cdetails\u003e\n\u003csummary\u003emini.deps\u003c/summary\u003e\n\n```lua\nlocal add, later = MiniDeps.add, MiniDeps.later\n\nlater(function()\n  add({ -- do read the installation section in the readme of mini.snippets!\n    source = \"echasnovski/mini.snippets\",\n    depends = { \"rafamadriz/friendly-snippets\" }\n  })\n  local snippets = require(\"mini.snippets\")\n  -- :h MiniSnippets-examples:\n  snippets.setup({ snippets = { snippets.gen_loader.from_lang() }})\n\n  add({ -- do read the installation section in the readme of nvim-cmp!\n    source = \"hrsh7th/nvim-cmp\",\n    depends = { \"abeldekat/cmp-mini-snippets\" }, -- this plugin\n  })\n  local cmp = require(\"cmp\")\n  require'cmp'.setup({\n    snippet = {\n      expand = function(args) -- mini.snippets expands snippets from lsp...\n        local insert = MiniSnippets.config.expand.insert or MiniSnippets.default_insert\n        insert({ body = args.body }) -- Insert at cursor\n        cmp.resubscribe({ \"TextChangedI\", \"TextChangedP\" })\n        require(\"cmp.config\").set_onetime({ sources = {} })\n      end,\n    },\n    sources = cmp.config.sources({ { name = \"mini_snippets\" } }),\n    mapping = cmp.mapping.preset.insert(), -- more opts...\n  })\nend)\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003elazy.nvim\u003c/summary\u003e\n\n```lua\nreturn {\n  { -- do read the installation section in the readme of mini.snippets!\n    \"echasnovski/mini.snippets\",\n    dependencies = \"rafamadriz/friendly-snippets\",\n    event = \"InsertEnter\", -- don't depend on other plugins to load...\n    -- :h MiniSnippets-examples:\n    opts = function()\n      local snippets = require(\"mini.snippets\")\n      return { snippets = { snippets.gen_loader.from_lang() }}\n    end,\n  },\n\n  { -- do read the installation section in the readme of nvim-cmp!\n    \"hrsh7th/nvim-cmp\",\n    main = \"cmp\",\n    dependencies = { \"abeldekat/cmp-mini-snippets\" }, -- this plugin\n    event = \"InsertEnter\",\n    opts = function()\n      local cmp = require(\"cmp\")\n      return {\n        snippet = {\n          expand = function(args) -- mini.snippets expands snippets from lsp...\n            local insert = MiniSnippets.config.expand.insert or MiniSnippets.default_insert\n            insert({ body = args.body }) -- Insert at cursor\n            cmp.resubscribe({ \"TextChangedI\", \"TextChangedP\" })\n            require(\"cmp.config\").set_onetime({ sources = {} })\n          end,\n        },\n        sources = cmp.config.sources({ { name = \"mini_snippets\" } }),\n        mapping = cmp.mapping.preset.insert(), -- more opts...\n      }\n    end,\n  },\n}\n```\n\n\u003c/details\u003e\n\n## Options\n\nThe default options can be modified in the `sources` field of the `nvim-cmp` spec.\n\n```lua\nsources = cmp.config.sources({\n  {\n    name = \"mini_snippets\",\n    option = {\n      -- completion items are cached using default mini.snippets context:\n      use_items_cache = false -- default: true\n    }\n  }\n}),\n```\n\n## Acknowledgments\n\n- [cmp_luasnip] by @saadparwaiz1\n- [nvim-cmp] and sources by @hrsh7th\n- [mini.snippets] by @echasnovski\n\n[mini.snippets]: https://github.com/echasnovski/mini.snippets\n[nvim-cmp]: https://github.com/hrsh7th/nvim-cmp\n[cmp_luasnip]: https://github.com/saadparwaiz1/cmp_luasnip\n[beta]: https://github.com/echasnovski/mini.nvim/issues/1428\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabeldekat%2Fcmp-mini-snippets","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fabeldekat%2Fcmp-mini-snippets","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabeldekat%2Fcmp-mini-snippets/lists"}