{ pkgs,... }: { programs.nixvim = { extraPackages = with pkgs; [ texliveFull texlivePackages.standalone texlivePackages.relsize # needed for BA # papis-nvim ]; plugins = { vimtex = { enable = true; lazyLoad.settings.filetype = [ "tex" ]; settings = { view_automatic = false; mappings_disable = { "n" = [ "K" ]; }; view_method = "zathura"; }; }; ltex-extra = { enable = true; lazyLoad.settings.filetype = [ "tex" ]; }; texpresso = { enable = true; lazyload.settings.filetype = [ "tex" ]; }; which-key.settings.spec = [ { __unkeyed-1 = "v"; group = "Vimtex"; icon = " "; } ]; }; autoGroups = { "lazyvim_vimtex_conceal" = { clear = true; }; }; autoCmd = [ { event = [ "FileType" ]; group = "lazyvim_vimtex_conceal"; pattern = [ "bib" "tex" ]; callback.__raw = # lua '' function () vim.wo.conceallevel = 2 end ''; } ]; keymaps = [ { key = "vc"; action = "VimtexCompile"; options.desc = "Start Vimtex"; } { key = "vs"; action = "VimtexStop"; options.desc = "Stop Vimtex"; } { key = "vr"; action = "VimtexClean"; options.desc = "Clean Vimtex"; } ]; files."ftplugin/latex.lua".keymaps = [ { action = "Texpresso %"; key = "t"; mode = [ "n" "v" "i" ]; options.desc = "Start Texpresso"; } ]; }; }