{ lib, pkgs, inputs, ... }:

{
  home-manager.users.moritz.programs.nixvim = {
    plugins.blink-compat.enable = true;
    plugins.cmp-vimtex.enable = true;
    plugins.lsp.capabilities = /* lua */ ''
      capabilities = require('blink.cmp').get_lsp_capabilities(capabilities)
    '';
    plugins.blink-cmp = {
      enable = true;
      settings = {
        keymap = {
          preset = "default";
        };
        appearance.nerd_font_variant = "mono";
        sources = {
          default = [
            "lsp"
            "path"
            "snippets"
            "buffer"
            "vimtex"
          ];
          providers.vimtex = {
            name = "vimtex";
            module = "blink.compat.source";
          };
        };
        signature.enabled = true;
        completion.documentation.auto_show = true;
        completion.accept.auto_brackets.enabled = true;
        snippets.preset = "luasnip";
      };
    };
  };
}
