cmp-nvim-lsp icon indicating copy to clipboard operation
cmp-nvim-lsp copied to clipboard

Error no file found although it should be installed

Open jfmoulin opened this issue 2 years ago • 2 comments

Although my init.lua (attached as txt) contains the require('cmp_nvim_lsp') I get the following error

no file './cmp_nvim_lsp.lua' no file '/home/runner/work/neovim/neovim/.deps/usr/share/luajit-2.1.0-beta3/cmp_nvim_lsp.lua' no file '/usr/local/share/lua/5.1/cmp_nvim_lsp.lua' no file '/usr/local/share/lua/5.1/cmp_nvim_lsp/init.lua' no file '/home/runner/work/neovim/neovim/.deps/usr/share/lua/5.1/cmp_nvim_lsp.lua' no file '/home/runner/work/neovim/neovim/.deps/usr/share/lua/5.1/cmp_nvim_lsp/init.lua' no file './cmp_nvim_lsp.so' no file '/usr/local/lib/lua/5.1/cmp_nvim_lsp.so' no file '/home/runner/work/neovim/neovim/.deps/usr/lib/lua/5.1/cmp_nvim_lsp.so' no file '/usr/local/lib/lua/5.1/loadall.so' init.lua.txt

jfmoulin avatar Sep 12 '22 19:09 jfmoulin

cmp_nvim_lsp seems not installed. You should check it is installed properly.

Shougo avatar Sep 13 '22 00:09 Shougo

Thanks, I had indeed understood that it is not installed.

I actually (stupidly) expected the line

capabilities = require('cmp_nvim_lsp').update_capabilities(capabilities)

to install the module.

After adding the obvious require("hrsh7th/cmp-nvim-lsp") above this line, the plugin is now installed.

Maybe extending the readme with an example of the most basic install and config would help noobs/impatient people like me...

Thanks for the nice work.

jfmoulin avatar Sep 13 '22 07:09 jfmoulin