all repos — nixfiles @ 3455bd0b573d30cce2514dd1d6f6ca9b248c23a2

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

Extract TabNine LSP config into module

Alan Pearce
commit

3455bd0b573d30cce2514dd1d6f6ca9b248c23a2

parent

0a50d682ec85bf023bebd68a3ca388001f0c0677

1 file changed, 8 insertions(+), 21 deletions(-)

changed files
M user/settings/tabnine.nixuser/settings/tabnine.nix
@@ -1,8 +1,12 @@
-{ config, pkgs, ... }: +{ ... }: -let - cfg = { - config = { +{ + imports = [ + ../modules/tabnine.nix + ]; + programs.tabnine = { + enable = true; + lspConfig = { "language.typescript" = { command = "typescript-language-server"; args = ["--stdio"];
@@ -36,22 +40,5 @@ command = "hie";
args = ["--stdio"]; }; }; - }; - configFile = config: - pkgs.runCommand "TabNine.toml" - { - buildInputs = [ pkgs.remarshal ]; - preferLocalBuild = true; - allowSubstitutes = false; - } - '' - remarshal -if json -of toml \ - < ${pkgs.writeText "config.json" (builtins.toJSON cfg.config)} \ - > $out - ''; -in -{ - xdg.configFile."TabNine/TabNine.toml" = { - source = configFile cfg.config; }; }