{"id":13494429,"url":"https://github.com/hrsh7th/cmp-nvim-lsp","last_synced_at":"2025-04-12T20:38:19.417Z","repository":{"id":37380355,"uuid":"389626165","full_name":"hrsh7th/cmp-nvim-lsp","owner":"hrsh7th","description":"nvim-cmp source for neovim builtin LSP client","archived":false,"fork":false,"pushed_at":"2025-04-01T08:30:04.000Z","size":28,"stargazers_count":1394,"open_issues_count":24,"forks_count":52,"subscribers_count":15,"default_branch":"main","last_synced_at":"2025-04-05T19:06:59.234Z","etag":null,"topics":["hacktoberfest","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/hrsh7th.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":"2021-07-26T12:34:15.000Z","updated_at":"2025-04-05T14:25:47.000Z","dependencies_parsed_at":"2023-12-10T11:31:11.612Z","dependency_job_id":"d87644ab-28d5-4729-88c7-b514eba86f3b","html_url":"https://github.com/hrsh7th/cmp-nvim-lsp","commit_stats":{"total_commits":38,"total_committers":13,"mean_commits":2.923076923076923,"dds":0.368421052631579,"last_synced_commit":"99290b3ec1322070bcfb9e846450a46f6efa50f0"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hrsh7th%2Fcmp-nvim-lsp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hrsh7th%2Fcmp-nvim-lsp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hrsh7th%2Fcmp-nvim-lsp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hrsh7th%2Fcmp-nvim-lsp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hrsh7th","download_url":"https://codeload.github.com/hrsh7th/cmp-nvim-lsp/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248631668,"owners_count":21136554,"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":["hacktoberfest","nvim-cmp"],"created_at":"2024-07-31T19:01:24.981Z","updated_at":"2025-04-12T20:38:19.391Z","avatar_url":"https://github.com/hrsh7th.png","language":"Lua","funding_links":[],"categories":["Lua","Completion","Plugins"],"sub_categories":["Diagnostics"],"readme":"# cmp-nvim-lsp\n\nnvim-cmp source for neovim's built-in language server client.\n\n## Capabilities\n\nLanguage servers provide different completion results depending on the capabilities of the client. Neovim's default omnifunc has basic support for serving completion candidates. nvim-cmp supports more types of completion candidates, so users must override the capabilities sent to the server such that it can provide these candidates during a completion request. These capabilities are provided via the helper function `require('cmp_nvim_lsp').default_capabilities`\n\nAs these candidates are sent on each request, **adding these capabilities will break the built-in omnifunc support for neovim's language server client**. `nvim-cmp` provides manually triggered completion that can replace omnifunc. See `:help cmp-faq` for more details.\n\n## Setup\n\n```lua\n\nrequire'cmp'.setup {\n  sources = {\n    { name = 'nvim_lsp' }\n  }\n}\n\n-- The nvim-cmp almost supports LSP's capabilities so You should advertise it to LSP servers..\nlocal capabilities = require('cmp_nvim_lsp').default_capabilities()\n\n-- An example for configuring `clangd` LSP to use nvim-cmp as a completion engine\nrequire('lspconfig').clangd.setup {\n  capabilities = capabilities,\n  ...  -- other lspconfig configs\n}\n```\n\n## Option\n\n`[%LSPCONFIG-NAME%].keyword_pattern`\n\nYou can override keyword_pattern for specific language-server like this.\n\n```lua\ncmp.setup {\n  ...\n  sources = {\n    {\n      name = 'nvim_lsp',\n      option = {\n        php = {\n          keyword_pattern = [=[[\\%(\\$\\k*\\)\\|\\k\\+]]=],\n        }\n      }\n    }\n  }\n  ...\n}\n```\n\n\n## Readme!\n\n1. There is a Github issue that documents [breaking changes](https://github.com/hrsh7th/cmp-nvim-lsp/issues/38) for cmp-nvim-lsp. Subscribe to the issue to be notified of upcoming breaking changes.\n2. This is my hobby project. You can support me via GitHub sponsors.\n3. Bug reports are welcome, but don't expect a fix unless you provide minimal configuration and steps to reproduce your issue.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhrsh7th%2Fcmp-nvim-lsp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhrsh7th%2Fcmp-nvim-lsp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhrsh7th%2Fcmp-nvim-lsp/lists"}