hrsh7th / nvim-cmp

A completion plugin for neovim coded in Lua.
MIT License
7.9k stars 394 forks source link

sources not recognized when not using package manager #1733

Open IOU4 opened 11 months ago

IOU4 commented 11 months ago

I have a minimal neovim setup without a plugin manager, so I git-cloned the lspconfig, nvim-cmp and cmp-nvim-lsp repos into the runtimepath. config loaded in init.lua:

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

local capabilities = require('cmp_nvim_lsp').default_capabilities()
require'lspconfig'.lua_ls.setup {
  capabilities = capabilities,
}

lsp is detected since it does show diagnosis in a lua file, but completion does not work and :CmpStatus shows:

:CmpStatus

# unknown source names

- nvim_lsp
Shougo commented 11 months ago

I use runtime! after/plugin/*.lua to load sources.

Note: It is Vim script though.

jinzhongjia commented 11 months ago

In fact, my cmpstatus is in the same situation, but it doesn't seem to affect normal use.