DEVELOPMENT ENVIRONMENT

~liljamo/nvim-flake

ref: 498eeca9ced6a220a5ccd9b431552cf84f52e22b nvim-flake/config/plugins/cmp.nix -rw-r--r-- 973 bytes
498eeca9Jonni Liljamo feat(telescope): a couple binds a month ago
                                                                                
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
36
37
38
39
40
41
{
  opts = {
    completeopt = [ "menu" "menuone" "noselect"];
  };
  extraConfigLua = ''
    vim.opt.shortmess:append "c"
  '';
  plugins = {
    cmp = {
      enable = true;
      settings = {
        sources = [
          { name = "nvim_lsp"; }
          { name = "async_path"; }
          { name = "buffer"; }
        ];
        mapping = {
          "<C-n>" = "cmp.mapping.select_next_item { behavior = cmp.SelectBehavior.Insert }";
          "<C-p>" = "cmp.mapping.select_prev_item { behavior = cmp.SelectBehavior.Insert }";
          "<C-y>" = ''
            cmp.mapping(
              cmp.mapping.confirm {
                behavior = cmp.ConfirmBehavior.Insert,
                select = true,
              },
              { "i", "c" }
            )
          '';
        };
      };
    };
    cmp-async-path.enable = true;
    cmp-buffer.enable = true;
    cmp-nvim-lsp.enable = true;

    lspkind = {
      enable = true;
      cmp.enable = true;
    };
  };
}