_: {
  programs.nixvim.diagnostics = {
    #   virtual_lines.enable = false;
    #   # virtual_lines = {
    #   # current_line = true;
    #   # format = ''
    #   #   function(d)
    #   #     if d.severity == vim.diagnostic.severity.ERROR then
    #   #       return d
    #   #     else
    #   #       return ""
    #   #     end
    #   #   end
    #   # '';
    #   # };
    # virtual_text = false;
    update_in_insert = false; # annoying with virtual_lines which keep updating
    severity_sort = true;
    float = {
      border = "rounded";
    };
  };

  programs.nixvim.opts = {
    # lazyredraw = true;
    startofline = true;
    showmatch = true;

    belloff = "all";
    showcmd = true;
    mouse = "a";
    modeline = true;
    wrap = false;
    spell = false;

    # don't change the directory when a file is opened
    # to work more like an IDE
    autochdir = false;

    autoindent = true;
    smartindent = true;
    smarttab = true;

    backspace = [
      "indent"
      "eol"
      "start"
    ];

    list = true;

    swapfile = false;
    backup = false;
    autoread = true;
    undofile = true;
    undodir = "/home/jana/.vimdid";

    tabstop = 4;
    softtabstop = 4;
    shiftwidth = 4;
    expandtab = true;

    # relative line numbers except the current line
    number = true;
    # relativenumber = true;

    # show (usually) hidden characters
    listchars = {
      nbsp = "¬";
      extends = "»";
      precedes = "«";
      trail = "·";
      tab = ">-";
    };

    # highlight current line
    cursorline = true;

    # clipboard == system clipboard
    clipboard = "unnamedplus";

    completeopt = [
      "menuone"
      "noselect"
      "noinsert"
    ];

    # disable auto-folding
    foldlevel = 99;
    foldlevelstart = 99;
  };
}
