mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-01-23 13:00:04 +08:00
.. | ||
after/plugin | ||
lua/cmp_nvim_lsp | ||
LICENSE | ||
README.md |
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,
}