1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-01-23 13:00:04 +08:00
SpaceVim/bundle/cmp-nvim-lsp
2022-01-01 22:13:13 +08:00
..
after/plugin feat(autocomplete): add nvim-cmp support 2022-01-01 22:13:13 +08:00
lua/cmp_nvim_lsp feat(autocomplete): add nvim-cmp support 2022-01-01 22:13:13 +08:00
LICENSE feat(autocomplete): add nvim-cmp support 2022-01-01 22:13:13 +08:00
README.md feat(autocomplete): add nvim-cmp support 2022-01-01 22:13:13 +08:00

cmp-nvim-lsp

nvim-cmp source for neovim builtin LSP client

Setup


require'cmp'.setup {
  sources = {
    { name = 'nvim_lsp' }
  }
}

-- The nvim-cmp almost supports LSP's capabilities so You should advertise it to LSP servers..
local capabilities = vim.lsp.protocol.make_client_capabilities()
capabilities = require('cmp_nvim_lsp').update_capabilities(capabilities)

-- The following example advertise capabilities to `clangd`.
require'lspconfig'.clangd.setup {
  capabilities = capabilities,
}