diff options
author | Alan Pearce | 2019-10-08 22:01:42 +0200 |
---|---|---|
committer | Alan Pearce | 2019-10-08 22:01:42 +0200 |
commit | 3455bd0b573d30cce2514dd1d6f6ca9b248c23a2 (patch) | |
tree | 3978a3ab5967845c962263e6a2abe5f257afc986 /user/settings | |
parent | 0a50d682ec85bf023bebd68a3ca388001f0c0677 (diff) | |
download | nixfiles-3455bd0b573d30cce2514dd1d6f6ca9b248c23a2.tar.lz nixfiles-3455bd0b573d30cce2514dd1d6f6ca9b248c23a2.tar.zst nixfiles-3455bd0b573d30cce2514dd1d6f6ca9b248c23a2.zip |
Extract TabNine LSP config into module
Diffstat (limited to 'user/settings')
-rw-r--r-- | user/settings/tabnine.nix | 29 |
1 files changed, 8 insertions, 21 deletions
diff --git a/user/settings/tabnine.nix b/user/settings/tabnine.nix index 8018bcca..9fa586b0 100644 --- a/user/settings/tabnine.nix +++ b/user/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"]; @@ -37,21 +41,4 @@ let }; }; }; - 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; - }; } |