DEVELOPMENT ENVIRONMENT

~liljamo/nvim-flake

ref: 3748c750a040c5669454f7aaf0c8f9e5bbcff46e nvim-flake/config/plugins/cmp.nix -rw-r--r-- 973 bytes
3748c750liljamo chore: update flake inputs and make suggested changes 4 months 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;
    };
  };
}