feat!: do not format by default
parent
1dc6361600
commit
408ab5cad3
|
@ -54,17 +54,19 @@ let
|
||||||
require("lazy").setup(${lazySpecs})
|
require("lazy").setup(${lazySpecs})
|
||||||
'';
|
'';
|
||||||
|
|
||||||
lazy =
|
formatted =
|
||||||
pkgs.runCommand "lazy.lua" { inherit text; } ''
|
pkgs.runCommand "lazy.lua" { inherit text; } ''
|
||||||
touch $out
|
touch $out
|
||||||
echo -n "$text" > $out
|
echo -n "$text" > $out
|
||||||
${getExe pkgs.stylua} $out
|
${getExe pkgs.stylua} $out
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
lazy = if cfg.format then readFile formatted else text;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.programs.neovim.lazy = {
|
options.programs.neovim.lazy = {
|
||||||
enable = mkEnableOption "lazy.nvim";
|
enable = mkEnableOption "lazy.nvim";
|
||||||
|
format = mkEnableOption "format";
|
||||||
plugins = mkOption
|
plugins = mkOption
|
||||||
{
|
{
|
||||||
default = [ ];
|
default = [ ];
|
||||||
|
@ -219,7 +221,7 @@ in
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
programs.neovim = {
|
programs.neovim = {
|
||||||
extraLuaConfig = readFile lazy;
|
extraLuaConfig = lazy;
|
||||||
extraPython3Packages = ps:
|
extraPython3Packages = ps:
|
||||||
let
|
let
|
||||||
plugins = map (getAttr "plugin") cfg.plugins;
|
plugins = map (getAttr "plugin") cfg.plugins;
|
||||||
|
|
Loading…
Reference in New Issue