{"id":13477373,"url":"https://github.com/ncm2/ncm2","last_synced_at":"2025-03-27T05:31:33.818Z","repository":{"id":33260964,"uuid":"136003551","full_name":"ncm2/ncm2","owner":"ncm2","description":":heart: Slim, Fast and Hackable Completion Framework for Neovim","archived":false,"fork":false,"pushed_at":"2022-03-17T11:00:56.000Z","size":586,"stargazers_count":1336,"open_issues_count":36,"forks_count":42,"subscribers_count":29,"default_branch":"master","last_synced_at":"2024-10-30T10:40:18.955Z","etag":null,"topics":["completion","ncm2","ncm2-plugin","neovim","vim"],"latest_commit_sha":null,"homepage":"","language":"Python","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/ncm2.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}},"created_at":"2018-06-04T09:38:45.000Z","updated_at":"2024-10-16T14:29:53.000Z","dependencies_parsed_at":"2022-08-07T20:17:21.629Z","dependency_job_id":null,"html_url":"https://github.com/ncm2/ncm2","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ncm2%2Fncm2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ncm2%2Fncm2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ncm2%2Fncm2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ncm2%2Fncm2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ncm2","download_url":"https://codeload.github.com/ncm2/ncm2/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245791553,"owners_count":20672666,"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":["completion","ncm2","ncm2-plugin","neovim","vim"],"created_at":"2024-07-31T16:01:41.845Z","updated_at":"2025-03-27T05:31:33.361Z","avatar_url":"https://github.com/ncm2.png","language":"Python","readme":"## Introduction\n\nNCM2, formerly known as\n[nvim-completion-manager](https://github.com/roxma/nvim-completion-manager),\nis a slim, fast and hackable completion framework for neovim.\n\nMain features:\n\n1. Fast and asynchronous completion support, with vimscript friendly API.\n2. Smart on files with different languages, for example, css/javascript\n   completion in html style/script tag.\n3. Function parameter expansion support using\n   [ncm2-snippet](https://github.com/topics/ncm2-snippet) plugins.\n4. [Language server protocol plugin\n   integration](https://github.com/ncm2/ncm2/wiki).\n\nRead [our wiki page](https://github.com/ncm2/ncm2/wiki) for a list of\nextensions and programming languages support for NCM2.\n\n![peek 2018-07-17 18-15](https://user-images.githubusercontent.com/4538941/42811661-dbfb5ba2-89ed-11e8-81c4-3fb893d1af9c.gif)\n\n[View demo vimrc at #19](https://github.com/ncm2/ncm2/issues/19)\n\n## Requirements\n\n- `:echo has(\"nvim-0.2.2\")` prints 1. Older versions has not been tested\n- `:echo has(\"python3\")` prints 1. This is usually set by\n    `python3 -m pip install pynvim` in shell and\n  `let g:python3_host_prog=/path/to/python/executable/` in vimrc.\n- Plugin [nvim-yarp](https://github.com/roxma/nvim-yarp)\n\nFor vim8 user, read the [nvim-yarp](https://github.com/roxma/nvim-yarp)\nREADME. **Note that vim8 support is simply a bonus. It's not the goal of\nNCM2.**\n\n## Install\n\n```vim\n    \" assuming you're using vim-plug: https://github.com/junegunn/vim-plug\n    Plug 'ncm2/ncm2'\n    Plug 'roxma/nvim-yarp'\n\n    \" enable ncm2 for all buffers\n    autocmd BufEnter * call ncm2#enable_for_buffer()\n\n    \" IMPORTANT: :help Ncm2PopupOpen for more information\n    set completeopt=noinsert,menuone,noselect\n\n    \" NOTE: you need to install completion sources to get completions. Check\n    \" our wiki page for a list of sources: https://github.com/ncm2/ncm2/wiki\n    Plug 'ncm2/ncm2-bufword'\n    Plug 'ncm2/ncm2-path'\n```\n\n## Optional Vimrc Tips\n\n```vim\n    \" suppress the annoying 'match x of y', 'The only match' and 'Pattern not\n    \" found' messages\n    set shortmess+=c\n\n    \" CTRL-C doesn't trigger the InsertLeave autocmd . map to \u003cESC\u003e instead.\n    inoremap \u003cc-c\u003e \u003cESC\u003e\n\n    \" When the \u003cEnter\u003e key is pressed while the popup menu is visible, it only\n    \" hides the menu. Use this mapping to close the menu and also start a new\n    \" line.\n    inoremap \u003cexpr\u003e \u003cCR\u003e (pumvisible() ? \"\\\u003cc-y\u003e\\\u003ccr\u003e\" : \"\\\u003cCR\u003e\")\n\n    \" Use \u003cTAB\u003e to select the popup menu:\n    inoremap \u003cexpr\u003e \u003cTab\u003e pumvisible() ? \"\\\u003cC-n\u003e\" : \"\\\u003cTab\u003e\"\n    inoremap \u003cexpr\u003e \u003cS-Tab\u003e pumvisible() ? \"\\\u003cC-p\u003e\" : \"\\\u003cS-Tab\u003e\"\n\n    \" wrap existing omnifunc\n    \" Note that omnifunc does not run in background and may probably block the\n    \" editor. If you don't want to be blocked by omnifunc too often, you could\n    \" add 180ms delay before the omni wrapper:\n    \"  'on_complete': ['ncm2#on_complete#delay', 180,\n    \"               \\ 'ncm2#on_complete#omni', 'csscomplete#CompleteCSS'],\n    au User Ncm2Plugin call ncm2#register_source({\n            \\ 'name' : 'css',\n            \\ 'priority': 9,\n            \\ 'subscope_enable': 1,\n            \\ 'scope': ['css','scss'],\n            \\ 'mark': 'css',\n            \\ 'word_pattern': '[\\w\\-]+',\n            \\ 'complete_pattern': ':\\s*',\n            \\ 'on_complete': ['ncm2#on_complete#omni', 'csscomplete#CompleteCSS'],\n            \\ })\n```\n\n## How Do I write Ncm2 Source?\n\nOne important step is to understand how and when completion gets triggered.\nRead `:help ncm2#register_source` carefully, or `:help\nncm2#register_source-example` for quick start.\n\nIn case you don't know what tool you should use for async support. Here are\nsome options available:\n\n- `:help jobstart()`\n- [python remote plugin\n  example](https://github.com/jacobsimpson/nvim-example-python-plugin)\n- I myself prefer to use [nvim-yarp](https://github.com/roxma/nvim-yarp)\n    - Read [ncm2/ncm2-bufword](https://github.com/ncm2/ncm2-bufword) for\n        example\n\n## Debugging\n\nRefer to the [debugging section of nvim-yarp](https://github.com/roxma/nvim-yarp#debugging)\n","funding_links":[],"categories":["Python"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fncm2%2Fncm2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fncm2%2Fncm2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fncm2%2Fncm2/lists"}