Skip to content

Latest Version Throws Error In cmp_luasnip #432

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

Closed
2 tasks done
MuntasirSZN opened this issue Dec 3, 2024 · 1 comment
Closed
2 tasks done

Latest Version Throws Error In cmp_luasnip #432

MuntasirSZN opened this issue Dec 3, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@MuntasirSZN
Copy link

Make sure you have done the following

  • I have updated to the latest version of blink.cmp
  • I have read the README

Bug Description

See It Yourself:
image

Relevant configuration

return {
  {
    "saghen/blink.cmp",
    lazy = false,
    version = "*",
    dependencies = {
      { "L3MON4D3/LuaSnip", build = "make install_jsregexp" },
      "saadparwaiz1/cmp_luasnip",
      "rafamadriz/friendly-snippets",
      {
        "saghen/blink.compat",
        version = "*",
        opts = { impersonate_nvim_cmp = true },
      },
    },
    ---@module 'blink.cmp'
    ---@type blink.cmp.Config
    opts = {
      snippets = {
        expand = function(snippet)
          require("luasnip").lsp_expand(snippet)
        end,
        active = function(filter)
          if filter and filter.direction then
            return require("luasnip").jumpable(filter.direction)
          end
          return require("luasnip").in_snippet()
        end,
        jump = function(direction)
          require("luasnip").jump(direction)
        end,
      },
      sources = {
        completion = {
          enabled_providers = { "luasnip", "lsp", "path", "snippets", "buffer" },
          menu = {
            draw = {
              columns = { { "kind_icon", "label", gap = 1 }, { "kind" } },
            },
          },
        },
        providers = {
          luasnip = {
            name = "luasnip",
            module = "blink.compat.source",

            score_offset = -3,

            opts = {
              use_show_condition = false,
              show_autosnippets = true,
            },
          },
        },
      },
      keymap = { preset = "enter" },
      vim.api.nvim_set_hl(0, "BlinkCmpMenu", { bg = "#212136", fg = "#cdd6f4" }),
      vim.api.nvim_set_hl(0, "BlinkCmpMenuBorder", { bg = "#1e1e2e", fg = "#585b70" }),
      vim.api.nvim_set_hl(0, "BlinkCmpDoc", { bg = "#212136", fg = "#cdd6f4" }),
      vim.api.nvim_set_hl(0, "BlinkCmpDocBorder", { bg = "#1e1e2e", fg = "#585b70" }),
      appearance = {
        use_nvim_cmp_as_default = true,
        nerd_font_variant = "normal",
        kind_icons = {
          Array = "",
          Boolean = "󰨙 ",
          Class = "",
          Codeium = "󰘦 ",
          Color = "",
          Control = "",
          Collapsed = "",
          Constant = "",
          Constructor = "",
          Copilot = "",
          Enum = "",
          EnumMember = "",
          Event = "",
          Field = "",
          File = "",
          Folder = "",
          Function = "󰊕 ",
          Interface = "",
          Key = "",
          Keyword = "",
          Method = "",
          Module = "",
          Namespace = "󰦮 ",
          Null = "",
          Number = "󰎠 ",
          Object = "",
          Operator = "",
          Package = "",
          Property = "",
          Reference = "",
          Snippet = "",
          String = "",
          Struct = "",
          TabNine = "󰏚 ",
          Text = "",
          TypeParameter = "",
          Unit = "",
          Value = "",
          Variable = "",
        },
      },
    },
  },
}

neovim version

v0.10.2

blink.cmp version: branch, tag, or commit

main

@MuntasirSZN MuntasirSZN added the bug Something isn't working label Dec 3, 2024
@MuntasirSZN
Copy link
Author

I tried blink luasnip, just changed the dependecies block and changed module, and no errors! Idk if blink_luasnip is official, though it works!

@Saghen Saghen closed this as completed in 08b59ed Dec 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant