Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

module 'cmp' not found #56

Closed
Rohith-JN opened this issue Jan 22, 2023 · 4 comments
Closed

module 'cmp' not found #56

Rohith-JN opened this issue Jan 22, 2023 · 4 comments

Comments

@Rohith-JN
Copy link

I am getting this error when I try to install cmp_luasnip

Error

Using packer:

use({ "L3MON4D3/LuaSnip" })

-- auto-completion engine
use({
    "hrsh7th/nvim-cmp",
    config = [[require('config.nvim-cmp')]],
    after = "lspkind-nvim",
    requires = {
        "saadparwaiz1/cmp_luasnip",
        "hrsh7th/cmp-nvim-lua",
        "hrsh7th/cmp-nvim-lsp",
        "hrsh7th/cmp-path",
        "hrsh7th/cmp-buffer",
        "hrsh7th/cmp-omni",
    },
})

use({ "saadparwaiz1/cmp_luasnip" })

use({
    "hrsh7th/cmp-nvim-lua",
    after = "cmp_luasnip",
})

-- nvim-cmp completion sources
use({ "hrsh7th/cmp-nvim-lsp", after = "nvim-cmp" })
use({ "hrsh7th/cmp-path", after = "nvim-cmp" })
use({ "hrsh7th/cmp-buffer", after = "nvim-cmp" })
use({ "hrsh7th/cmp-omni", after = "nvim-cmp" })

Here is my nvim-config

@TornaxO7
Copy link

TornaxO7 commented Jan 22, 2023

Try removing those lines:

use({ "saadparwaiz1/cmp_luasnip" })

use({
    "hrsh7th/cmp-nvim-lua",
    after = "cmp_luasnip",
})

-- nvim-cmp completion sources
use({ "hrsh7th/cmp-nvim-lsp", after = "nvim-cmp" })
use({ "hrsh7th/cmp-path", after = "nvim-cmp" })
use({ "hrsh7th/cmp-buffer", after = "nvim-cmp" })
use({ "hrsh7th/cmp-omni", after = "nvim-cmp" })

@Rohith-JN
Copy link
Author

The error persists

@L3MON4D3
Copy link
Contributor

Maybe packer needs the full plugin-name in after? And/Or the after-directive has to be added to cmp_luasnip too? Try copy-pasting someone elses setup and see if it works/what changes make it no longer work
(Also, I suspect this is some error with packer, maybe look in their issues)

@Rohith-JN
Copy link
Author

@L3MON4D3 I tried switching configs and also modified the order of plugins, nothing worked. Maybe it is a packer issue

@saadparwaiz1 saadparwaiz1 closed this as not planned Won't fix, can't repro, duplicate, stale Nov 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants