diff options
author | Alan Pearce | 2019-12-09 17:27:14 +0100 |
---|---|---|
committer | Alan Pearce | 2019-12-09 17:27:14 +0100 |
commit | 581d41b82efbd534eba36a7906078361ee6d3f85 (patch) | |
tree | e9402e46ca8f13d342bb85644f75355069e39b94 /user/settings | |
parent | 8d9f5216c8cf2a89488a9fa303e0a71557a6fdc4 (diff) | |
download | nixfiles-581d41b82efbd534eba36a7906078361ee6d3f85.tar.lz nixfiles-581d41b82efbd534eba36a7906078361ee6d3f85.tar.zst nixfiles-581d41b82efbd534eba36a7906078361ee6d3f85.zip |
tabnine: add crude management of tabnine installation and config
Diffstat (limited to 'user/settings')
-rw-r--r-- | user/settings/tabnine.nix | 72 |
1 files changed, 59 insertions, 13 deletions
diff --git a/user/settings/tabnine.nix b/user/settings/tabnine.nix index 9fa586b0..6a9e88a0 100644 --- a/user/settings/tabnine.nix +++ b/user/settings/tabnine.nix @@ -1,44 +1,90 @@ -{ ... }: +{ pkgs, ... }: -{ - imports = [ - ../modules/tabnine.nix - ]; +let + inherit (pkgs) stdenv; + + version = "2.1.21"; + target = if stdenv.isDarwin then + "x86_64-apple-darwin" + else + "x86_64-unknown-linux-musl"; +in { + imports = [ ../modules/tabnine.nix ]; programs.tabnine = { enable = true; + config = { + inherit version; + + hide_promotional_message = true; + beta_enabled = "No"; + ignore_all_lsp = false; + creation_time = "2019-08-26T09:51:35.732522096Z"; + semantic_status = { + typescript = "Enabled"; + javascript = "Enabled"; + yaml = "Enabled"; + }; + disable_auto_update = true; + user_understands_that_enabling_tabnine_cloud_sends_code_to_tabnine_servers = + false; + hosted_deep_completions_enabled = "Disabled"; + tabnine_cloud_host = null; + tabnine_cloud_port = null; + cloud_whitelist = [ ]; + api_key = null; + api_key_service_level = null; + api_base_url = null; + local_enabled = "No"; + disable_local_when_using_battery = true; + hide_deep_information_message = false; + enable_power_saving_mode = false; + rate_limit_interval_seconds = null; + rate_limit_amount = null; + }; lspConfig = { "language.typescript" = { command = "typescript-language-server"; - args = ["--stdio"]; + args = [ "--stdio" ]; }; "language.javascript" = { command = "javascript-typescript-stdio"; - args = ["--stdio"]; + args = [ "--stdio" ]; }; "language.css" = { command = "css-languageserver"; - args = ["--stdio"]; + args = [ "--stdio" ]; }; "language.scss" = { command = "css-languageserver"; - args = ["--stdio"]; + args = [ "--stdio" ]; }; "language.html" = { command = "html-languageserver"; - args = ["--stdio"]; + args = [ "--stdio" ]; }; "language.dockerfile" = { command = "docker-langserver"; - args = ["--stdio"]; + args = [ "--stdio" ]; }; "language.yaml" = { command = "yaml-language-server"; - args = ["--stdio"]; + args = [ "--stdio" ]; }; "language.haskell" = { command = "hie"; - args = ["--stdio"]; + args = [ "--stdio" ]; }; }; }; + + home.file.".local/tabnine/${version}/${target}/TabNine" = { + executable = true; + source = (pkgs.fetchurl { + url = "https://update.tabnine.com/${version}/${target}/TabNine"; + sha256 = if stdenv.isDarwin then + "00kjin3d9fq7332b8nm4ylli007fqbph42h7mykmk4lssy9dy8mm" + else + "0926qag5p513hxljc7qwmyi32y2grlhfdiz899i0rxky8rkcwhqh"; + }); + }; } |