diff options
author | Alan Pearce | 2024-05-03 00:19:18 +0200 |
---|---|---|
committer | Alan Pearce | 2024-05-03 00:19:18 +0200 |
commit | ae74f7ae134193dc7f132fe1c6f5c1c27ed17bf3 (patch) | |
tree | c01ac91e1a9dd2685146fc63ce024847760c526e /user/modules | |
parent | 1d9af3f92cd0ca23a2cd8465f54976d01b915104 (diff) | |
download | nixfiles-ae74f7ae134193dc7f132fe1c6f5c1c27ed17bf3.tar.lz nixfiles-ae74f7ae134193dc7f132fe1c6f5c1c27ed17bf3.tar.zst nixfiles-ae74f7ae134193dc7f132fe1c6f5c1c27ed17bf3.zip |
tabnine: update module and configuration
Diffstat (limited to 'user/modules')
-rw-r--r-- | user/modules/tabnine.nix | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/user/modules/tabnine.nix b/user/modules/tabnine.nix index a702cf29..3eee4834 100644 --- a/user/modules/tabnine.nix +++ b/user/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 @@ in }; lspConfig = mkOption { - type = types.attrs; + type = tomlFormat.type; default = { }; description = '' LSP Server configuration written to @@ -64,7 +65,7 @@ in 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 @@ in 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)) ''; }; } |