mirror of
https://github.com/nix-community/nixvim.git
synced 2025-08-16 07:28:00 +02:00
added formatter + reformat existing codebase
This commit is contained in:
parent
0bf4313f22
commit
1cab8e5167
96 changed files with 3727 additions and 3341 deletions
|
@ -1,65 +1,69 @@
|
|||
{ pkgs, config, lib, ... }:
|
||||
with lib;
|
||||
let
|
||||
cfg = config.plugins.project-nvim;
|
||||
helpers = import ../helpers.nix { inherit lib pkgs; };
|
||||
in
|
||||
{
|
||||
options.plugins.project-nvim = helpers.extraOptionsOptions // {
|
||||
enable = mkEnableOption "project.nvim";
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.plugins.project-nvim;
|
||||
helpers = import ../helpers.nix {inherit lib pkgs;};
|
||||
in {
|
||||
options.plugins.project-nvim =
|
||||
helpers.extraOptionsOptions
|
||||
// {
|
||||
enable = mkEnableOption "project.nvim";
|
||||
|
||||
package = helpers.mkPackageOption "project-nvim" pkgs.vimPlugins.project-nvim;
|
||||
package = helpers.mkPackageOption "project-nvim" pkgs.vimPlugins.project-nvim;
|
||||
|
||||
manualMode = mkOption {
|
||||
type = types.nullOr types.bool;
|
||||
default = null;
|
||||
manualMode = mkOption {
|
||||
type = types.nullOr types.bool;
|
||||
default = null;
|
||||
};
|
||||
|
||||
detectionMethods = mkOption {
|
||||
type = types.nullOr (types.listOf types.str);
|
||||
default = null;
|
||||
};
|
||||
|
||||
patterns = mkOption {
|
||||
type = types.nullOr (types.listOf types.str);
|
||||
default = null;
|
||||
};
|
||||
|
||||
ignoreLsp = mkOption {
|
||||
type = types.nullOr (types.listOf types.str);
|
||||
default = null;
|
||||
};
|
||||
|
||||
excludeDirs = mkOption {
|
||||
type = types.nullOr (types.listOf types.str);
|
||||
default = null;
|
||||
};
|
||||
|
||||
showHidden = mkOption {
|
||||
type = types.nullOr types.bool;
|
||||
default = null;
|
||||
};
|
||||
|
||||
silentChdir = mkOption {
|
||||
type = types.nullOr types.bool;
|
||||
default = null;
|
||||
};
|
||||
|
||||
scopeChdir = mkOption {
|
||||
type = types.nullOr (types.enum ["global" "tab" "win"]);
|
||||
default = null;
|
||||
};
|
||||
|
||||
dataPath = mkOption {
|
||||
type = types.nullOr (types.either types.str helpers.rawType);
|
||||
default = null;
|
||||
};
|
||||
};
|
||||
|
||||
detectionMethods = mkOption {
|
||||
type = types.nullOr (types.listOf types.str);
|
||||
default = null;
|
||||
};
|
||||
|
||||
patterns = mkOption {
|
||||
type = types.nullOr (types.listOf types.str);
|
||||
default = null;
|
||||
};
|
||||
|
||||
ignoreLsp = mkOption {
|
||||
type = types.nullOr (types.listOf types.str);
|
||||
default = null;
|
||||
};
|
||||
|
||||
excludeDirs = mkOption {
|
||||
type = types.nullOr (types.listOf types.str);
|
||||
default = null;
|
||||
};
|
||||
|
||||
showHidden = mkOption {
|
||||
type = types.nullOr types.bool;
|
||||
default = null;
|
||||
};
|
||||
|
||||
silentChdir = mkOption {
|
||||
type = types.nullOr types.bool;
|
||||
default = null;
|
||||
};
|
||||
|
||||
scopeChdir = mkOption {
|
||||
type = types.nullOr (types.enum [ "global" "tab" "win" ]);
|
||||
default = null;
|
||||
};
|
||||
|
||||
dataPath = mkOption {
|
||||
type = types.nullOr (types.either types.str helpers.rawType);
|
||||
default = null;
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
config =
|
||||
let
|
||||
options = {
|
||||
config = let
|
||||
options =
|
||||
{
|
||||
manual_mode = cfg.manualMode;
|
||||
detection_methods = cfg.detectionMethods;
|
||||
patterns = cfg.patterns;
|
||||
|
@ -69,10 +73,11 @@ in
|
|||
silent_chdir = cfg.silentChdir;
|
||||
scope_schdir = cfg.scopeChdir;
|
||||
data_path = cfg.dataPath;
|
||||
} // cfg.extraOptions;
|
||||
in
|
||||
}
|
||||
// cfg.extraOptions;
|
||||
in
|
||||
mkIf cfg.enable {
|
||||
extraPlugins = [ cfg.package ];
|
||||
extraPlugins = [cfg.package];
|
||||
|
||||
extraConfigLua = ''
|
||||
require('project_nvim').setup(${helpers.toLuaObject options})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue