mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-28 03:20:08 +02:00
treewide: Reformat with nixfmt
This commit is contained in:
parent
c6281260dc
commit
62f32bfc71
459 changed files with 28139 additions and 26377 deletions
|
@ -6,90 +6,86 @@
|
|||
...
|
||||
}:
|
||||
with lib;
|
||||
helpers.vim-plugin.mkVimPlugin config {
|
||||
name = "vimtex";
|
||||
defaultPackage = pkgs.vimPlugins.vimtex;
|
||||
globalPrefix = "vimtex_";
|
||||
helpers.vim-plugin.mkVimPlugin config {
|
||||
name = "vimtex";
|
||||
defaultPackage = pkgs.vimPlugins.vimtex;
|
||||
globalPrefix = "vimtex_";
|
||||
|
||||
maintainers = [maintainers.GaetanLepage];
|
||||
maintainers = [ maintainers.GaetanLepage ];
|
||||
|
||||
extraPackages = [pkgs.pstree];
|
||||
extraPackages = [ pkgs.pstree ];
|
||||
|
||||
# TODO introduced 2024-02-20: remove 2024-04-20
|
||||
deprecateExtraConfig = true;
|
||||
optionsRenamedToSettings = [
|
||||
"viewMethod"
|
||||
];
|
||||
imports = let
|
||||
basePluginPath = ["plugins" "vimtex"];
|
||||
in [
|
||||
(
|
||||
mkRemovedOptionModule
|
||||
(basePluginPath ++ ["installTexLive"])
|
||||
"If you don't want `texlive` to be installed, set `plugins.vimtex.texlivePackage` to `null`."
|
||||
)
|
||||
(
|
||||
mkRenamedOptionModule
|
||||
(basePluginPath ++ ["texLivePackage"])
|
||||
(basePluginPath ++ ["texlivePackage"])
|
||||
)
|
||||
# TODO introduced 2024-02-20: remove 2024-04-20
|
||||
deprecateExtraConfig = true;
|
||||
optionsRenamedToSettings = [ "viewMethod" ];
|
||||
imports =
|
||||
let
|
||||
basePluginPath = [
|
||||
"plugins"
|
||||
"vimtex"
|
||||
];
|
||||
in
|
||||
[
|
||||
(mkRemovedOptionModule (
|
||||
basePluginPath ++ [ "installTexLive" ]
|
||||
) "If you don't want `texlive` to be installed, set `plugins.vimtex.texlivePackage` to `null`.")
|
||||
(mkRenamedOptionModule (basePluginPath ++ [ "texLivePackage" ]) (
|
||||
basePluginPath ++ [ "texlivePackage" ]
|
||||
))
|
||||
];
|
||||
|
||||
settingsOptions = {
|
||||
view_method = mkOption {
|
||||
type = types.str;
|
||||
default = "general";
|
||||
example = "zathura";
|
||||
description = ''
|
||||
Set the viewer method.
|
||||
By default, a generic viewer is used through the general view method (e.g. `xdg-open` on Linux).
|
||||
'';
|
||||
};
|
||||
settingsOptions = {
|
||||
view_method = mkOption {
|
||||
type = types.str;
|
||||
default = "general";
|
||||
example = "zathura";
|
||||
description = ''
|
||||
Set the viewer method.
|
||||
By default, a generic viewer is used through the general view method (e.g. `xdg-open` on Linux).
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
settingsExample = {
|
||||
view_method = "zathura";
|
||||
compiler_method = "latexrun";
|
||||
toc_config = {
|
||||
split_pos = "vert topleft";
|
||||
split_width = 40;
|
||||
};
|
||||
};
|
||||
|
||||
extraOptions = {
|
||||
texlivePackage = mkOption {
|
||||
type = with types; nullOr package;
|
||||
default = pkgs.texlive.combined.scheme-medium;
|
||||
example = null;
|
||||
description = ''
|
||||
The package to install for `textlive.
|
||||
Set to `null` for not installing `texlive` at all.
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
extraConfig = cfg: {
|
||||
plugins.vimtex.settings = {
|
||||
enabled = true;
|
||||
callback_progpath = "nvim";
|
||||
};
|
||||
|
||||
settingsExample = {
|
||||
view_method = "zathura";
|
||||
compiler_method = "latexrun";
|
||||
toc_config = {
|
||||
split_pos = "vert topleft";
|
||||
split_width = 40;
|
||||
};
|
||||
};
|
||||
|
||||
extraOptions = {
|
||||
texlivePackage = mkOption {
|
||||
type = with types; nullOr package;
|
||||
default = pkgs.texlive.combined.scheme-medium;
|
||||
example = null;
|
||||
description = ''
|
||||
The package to install for `textlive.
|
||||
Set to `null` for not installing `texlive` at all.
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
extraConfig = cfg: {
|
||||
plugins.vimtex.settings = {
|
||||
enabled = true;
|
||||
callback_progpath = "nvim";
|
||||
};
|
||||
|
||||
extraPackages = let
|
||||
extraPackages =
|
||||
let
|
||||
# xdotool does not exist on darwin
|
||||
xdotool = optional pkgs.stdenv.isLinux pkgs.xdotool;
|
||||
viewerPackages =
|
||||
{
|
||||
general = xdotool;
|
||||
zathura = xdotool ++ [pkgs.zathura];
|
||||
zathura_simple = [pkgs.zathura];
|
||||
mupdf = xdotool ++ [pkgs.mupdf];
|
||||
zathura = xdotool ++ [ pkgs.zathura ];
|
||||
zathura_simple = [ pkgs.zathura ];
|
||||
mupdf = xdotool ++ [ pkgs.mupdf ];
|
||||
}
|
||||
.${cfg.settings.view_method}
|
||||
or [];
|
||||
.${cfg.settings.view_method} or [ ];
|
||||
in
|
||||
[
|
||||
cfg.texlivePackage
|
||||
]
|
||||
++ viewerPackages;
|
||||
};
|
||||
}
|
||||
[ cfg.texlivePackage ] ++ viewerPackages;
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue