From 05dd85210e465caa44ef7254f2781b2d12ba2882 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Sun, 16 Oct 2022 23:49:18 +0200 Subject: Reformat files with alejandra --- user/modules/eshell.nix | 15 +++++++++------ user/modules/nvim-coc.nix | 15 ++++++++------- user/modules/tabnine.nix | 47 +++++++++++++++++++++++++---------------------- 3 files changed, 42 insertions(+), 35 deletions(-) (limited to 'user/modules') diff --git a/user/modules/eshell.nix b/user/modules/eshell.nix index eaa4a206..fd108af6 100644 --- a/user/modules/eshell.nix +++ b/user/modules/eshell.nix @@ -1,12 +1,15 @@ -{ config, lib, pkgs, ... }: - -with lib; - -let cfg = config.programs.emacs; +{ + config, + lib, + pkgs, + ... +}: +with lib; let + cfg = config.programs.emacs; in { options.programs.emacs.eshell = { aliases = mkOption { - default = { }; + default = {}; type = types.attrsOf types.str; example = { ll = "ls -l $*"; diff --git a/user/modules/nvim-coc.nix b/user/modules/nvim-coc.nix index 5aa462f0..bc8fbb19 100644 --- a/user/modules/nvim-coc.nix +++ b/user/modules/nvim-coc.nix @@ -1,12 +1,13 @@ -{ config, lib, pkgs, ... }: - -with lib; - -let +{ + config, + lib, + pkgs, + ... +}: +with lib; let inherit (pkgs) stdenv; cfg = config.programs.neovim.coc; -in -{ +in { options.programs.neovim.coc = { config = mkOption { type = types.attrs; diff --git a/user/modules/tabnine.nix b/user/modules/tabnine.nix index 16065ab1..261176dc 100644 --- a/user/modules/tabnine.nix +++ b/user/modules/tabnine.nix @@ -1,32 +1,35 @@ -{ config, lib, pkgs, ... }: - -with lib; - -let +{ + config, + lib, + pkgs, + ... +}: +with lib; let inherit (pkgs) stdenv; cfg = config.programs.tabnine; lspConfigFile = config: - pkgs.runCommand "TabNine.toml" - { - buildInputs = [ pkgs.remarshal ]; - preferLocalBuild = true; - allowSubstitutes = false; - } - '' - remarshal -if json -of toml \ - < ${pkgs.writeText "config.json" (builtins.toJSON cfg.lspConfig)} \ - | sed -e 's/^\["\(.*\)"\]/[\1]/' \ - > $out - ''; -in -{ - + pkgs.runCommand "TabNine.toml" + { + buildInputs = [pkgs.remarshal]; + preferLocalBuild = true; + allowSubstitutes = false; + } + '' + remarshal -if json -of toml \ + < ${pkgs.writeText "config.json" (builtins.toJSON cfg.lspConfig)} \ + | sed -e 's/^\["\(.*\)"\]/[\1]/' \ + > $out + ''; +in { options.programs.tabnine = { enable = mkEnableOption "TabNine, Smart Compose for code."; configDir = mkOption { type = types.str; - default = if stdenv.isDarwin then "Library/Preferences/TabNine" else "${config.xdg.configHome}/TabNine"; + default = + if stdenv.isDarwin + then "Library/Preferences/TabNine" + else "${config.xdg.configHome}/TabNine"; description = '' Location of TabNine configuration directory relative to \$HOME ''; @@ -34,7 +37,7 @@ in config = mkOption { type = types.attrs; - default = { }; + default = {}; description = '' TabNine configuration written to \${configDir}/tabnine_config.json -- cgit 1.4.1