0

After installing luasnip I encountered this error:

enter image description here enter image description here

Even though cmp is already installed

Plugins.lua

use({ "onsails/lspkind-nvim", event = "VimEnter" })

use({ "L3MON4D3/LuaSnip", after = 'nvim-cmp', })

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

use({ "saadparwaiz1/cmp_luasnip" })

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

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" })

use({ "neovim/nvim-lspconfig", after = "cmp-nvim-lsp", config = [[require('config.lsp')]] })
use({ "rafamadriz/friendly-snippets" })

Nvim version: 0.8.1

Nvim-config

1 Answer 1

1

I'd remove the after attribute of Luasnip as shown in the README of cmp_luasnip:

 use "L3MON4D3/LuaSnip"

Edit 1

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

Copy+paste this and replace with this part of your config.

9
  • That fixed the luasnip not found error but I am still getting module cmp not found Jan 22 at 4:14
  • I edited my answer, try it with my edit
    – TornaxO7
    Jan 22 at 11:45
  • That did not resolve the issue Jan 22 at 13:57
  • Should I open an issue in LuaSnip? Jan 22 at 14:03
  • Are you still getting the same errors?
    – TornaxO7
    Jan 22 at 15:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.