{ pkgs, config, lib, ... }: let cfg = config.soispha.programs.nvim; in { home-manager.users.soispha.programs.nixvim = lib.mkIf cfg.enable { extraPlugins = [ pkgs.vimExtraPlugins.telescope-bibtex-nvim ]; # Only activate this in tex files. # TODO: Why? <2024-11-23> extraFiles = { "ftplugin/tex.lua".text = '' ${lib.strings.fileContents ./tex.lua} ''; }; keymaps = [ { key = "ib"; # This is registered in the ftplugin file, so we set this to null here action = ""; mode = "n"; options.desc = "[i]nsert a [b]atex citation"; } ]; }; }