summaryrefslogtreecommitdiff
path: root/pkgs/custom-neovim/config/lua/plugins/completion.lua
blob: 3228662ed557cf794dbf90c0863ee33715240c69 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
return {
  {
    "blink.cmp",
    lazy = true,
    event = {
      "InsertEnter",
      "CmdlineEnter",
    },
    before = function()
      require("lz.n").trigger_load("luasnip")
    end,
    after = function()
      require("blink.cmp").setup {
        snippets = { preset = 'luasnip' },
        sources = {
          default = { 'lsp', 'path', 'snippets', 'buffer' },
        },
        cmdline = {
          keymap = { preset = 'inherit' },
          completion = { menu = { auto_show = true } },
        },
      }
    end,
  },
  {
    "luasnip",
    lazy = true,
    before = function ()
      vim.cmd.packadd("friendly-snippets")
    end,
    after = function ()
      require("luasnip.loaders.from_vscode").lazy_load()
    end,
  }
}