Home Manager: Cannot get vimPlugins.coc-vimtex or vimPlugins.coc-texlab to work

Problem

When opening a tex file I get, for vimPlugins.coc-texlab, the following popup:

TexLab Server is not found, download from GitHub?
1. Yes
2. Cancel

I get a similar error when trying with vimPlugins.coc-vimtex.

Question

Any advice on how to solve above problem?

Additional info

Configuration

I think the following are the relevant parts of my Home Manager configuration:

programs.neovim.enable     = true;
programs.neovim.coc.enable = true;
programs.neovim.plugins    = [
  # …
  pkgs.vimPlugins.coc-texlab
  # …
];

Relevant links

you are missing the actual program texlab as the message mentions. you didn’t say what happened after answering “yes” but chances are it will fail as the download texlab executable wont work.

add pkgs.texlab to your environment.
We’ll try to make it work out of the box in the future see collect and add to PATH runtimeinputs of neovim plugin dependencies · Issue #352738 · NixOS/nixpkgs · GitHub

2 Likes

Thanks, adding pkgs.texlab to home.packages solved it!

@anders, I changed the post to help category and you can now mark teto’s answer as solution.

1 Like