about summary refs log tree commit diff stats
path: root/modules/by-name/nv/nvim/plgs/vim-tex/default.nix
blob: 680f169a5f5325d485389b8c5e78b9056863a384 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
{
  config,
  lib,
  ...
}: let
  cfg = config.soispha.programs.nvim;
in {
  home-manager.users.soispha.programs.nixvim = lib.mkIf cfg.enable {
    opts.conceallevel = 0;

    plugins.vimtex = {
      enable = true;
      settings = {
        view_method = "zathura";
        quickfix_mode = -1;
        view_enabled = -1;
        tex_conceal = "abdmg";
        tex_flavor = "latex";

        # Useful if treesitter is the highlighter
        syntax_enabled = 0;
        syntax_conceal_disable = 1;

        mappings_disable = {
          n = [
            "ts$"
            "tsD"
            "tsb"
            "tsc"
            "tsd"
            "tse"
            "tsf"
          ];
          x = [
            "tsD"
            "tsd"
            "tsf"
          ];
        };

        toc_config = {
          name = "TOC";
          layers = ["content" "todo" "include"];
          resize = false;
          split_width = 49;
          todo_sorted = -1;
          show_help = false;
          show_numbers = false;
          mode = true;
          layer_keys = {
            content = "C";
            label = "L";
            todo = "j";
            include = "I";
          };
        };

        compiler_latexmk = {
          build_dir = "build";
          callback = false;
          continuous = true;
          executable = "latexmk";
          hooks = [];
          options = [
            "-verbose"
            "-file-line-error"
            "-synctex=0"
            "-interaction=nonstopmode"
            "-outdir=build"
          ];
        };
      };
    };
  };
}