all repos — nixfiles @ ae74f7ae134193dc7f132fe1c6f5c1c27ed17bf3

System and user configuration, managed by nix and home-manager

tabnine: update module and configuration

Alan Pearce
commit

ae74f7ae134193dc7f132fe1c6f5c1c27ed17bf3

parent

1d9af3f92cd0ca23a2cd8465f54976d01b915104

1 file changed, 6 insertions(+), 5 deletions(-)

changed files
M user/modules/tabnine.nixuser/modules/tabnine.nix
@@ -5,6 +5,7 @@ , ...
}: with lib; let inherit (pkgs) stdenv; + tomlFormat = pkgs.formats.toml { }; cfg = config.programs.tabnine; lspConfigFile = config: pkgs.runCommand "TabNine.toml"
@@ -52,7 +53,7 @@ '';
}; lspConfig = mkOption { - type = types.attrs; + type = tomlFormat.type; default = { }; description = '' LSP Server configuration written to
@@ -64,7 +65,7 @@ };
config = mkIf cfg.enable { home.file."${cfg.configDir}/TabNine.toml" = { - source = lspConfigFile cfg.lspConfig; + source = (tomlFormat.generate "TabNine.toml" cfg.lspConfig); }; home.file."${cfg.configDir}/tabnine_config.json" = { source = pkgs.writeText "tabnine_config.json" (builtins.toJSON cfg.config);
@@ -84,10 +85,10 @@ programs.emacs.extraPackages = epkgs: [
epkgs.tabnine ]; programs.emacs.extraConfig = '' + (defun my/override-tabnine-exe-path (&rest args) + "${pkgs.tabnine}/bin/TabNine") (with-eval-after-load 'tabnine - (advice-add 'tabnine--executable-path :around - (lambda (original-function &rest args) - "${pkgs.tabnine}/bin/TabNine"))) + (advice-add 'tabnine--executable-path :override #'my/override-tabnine-exe-path)) ''; }; }