mirror of
https://github.com/nix-community/nixvim.git
synced 2025-07-10 09:14:31 +02:00
added formatter + reformat existing codebase (#175)
This commit is contained in:
parent
0bf4313f22
commit
264de8cefb
96 changed files with 3727 additions and 3341 deletions
|
@ -1,42 +1,40 @@
|
|||
{ pkgs
|
||||
, lib
|
||||
, config
|
||||
, ...
|
||||
}:
|
||||
let
|
||||
cfg = config.plugins.vimtex;
|
||||
helpers = import ../helpers.nix { inherit lib; };
|
||||
in
|
||||
with lib;
|
||||
{
|
||||
options.plugins.vimtex = {
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
cfg = config.plugins.vimtex;
|
||||
helpers = import ../helpers.nix {inherit lib;};
|
||||
in
|
||||
with lib; {
|
||||
options.plugins.vimtex = {
|
||||
enable = mkEnableOption "vimtex";
|
||||
|
||||
enable = mkEnableOption "vimtex";
|
||||
package = helpers.mkPackageOption "vimtex" pkgs.vimPlugins.vimtex;
|
||||
|
||||
package = helpers.mkPackageOption "vimtex" pkgs.vimPlugins.vimtex;
|
||||
|
||||
extraConfig = helpers.mkNullOrOption types.attrs ''
|
||||
The configuration options for vimtex without the 'vimtex_' prefix.
|
||||
Example: To set 'vimtex_compiler_enabled' to 1, write
|
||||
extraConfig = {
|
||||
compiler_enabled = true;
|
||||
};
|
||||
'';
|
||||
};
|
||||
|
||||
config =
|
||||
let
|
||||
globals = {
|
||||
enabled = cfg.enable;
|
||||
} // cfg.extraConfig;
|
||||
in
|
||||
mkIf cfg.enable {
|
||||
|
||||
extraPlugins = [ cfg.package ];
|
||||
|
||||
# Usefull for inverse search
|
||||
extraPackages = with pkgs; [ pstree xdotool ];
|
||||
|
||||
globals = mapAttrs' (name: value: nameValuePair ("vimtex_" + name) value) globals;
|
||||
extraConfig = helpers.mkNullOrOption types.attrs ''
|
||||
The configuration options for vimtex without the 'vimtex_' prefix.
|
||||
Example: To set 'vimtex_compiler_enabled' to 1, write
|
||||
extraConfig = {
|
||||
compiler_enabled = true;
|
||||
};
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
||||
config = let
|
||||
globals =
|
||||
{
|
||||
enabled = cfg.enable;
|
||||
}
|
||||
// cfg.extraConfig;
|
||||
in
|
||||
mkIf cfg.enable {
|
||||
extraPlugins = [cfg.package];
|
||||
|
||||
# Usefull for inverse search
|
||||
extraPackages = with pkgs; [pstree xdotool];
|
||||
|
||||
globals = mapAttrs' (name: value: nameValuePair ("vimtex_" + name) value) globals;
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue