From 0f115747d396dccab3bc555f54f35c21d1011dad Mon Sep 17 00:00:00 2001 From: Amir Bilu Date: Mon, 22 Jul 2024 19:38:36 +0300 Subject: [PATCH] support insecure (#180) --- README.md | 4 +++- lua/tabnine/binary.lua | 3 +++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 61a8c58..3d033c7 100644 --- a/README.md +++ b/README.md @@ -128,6 +128,7 @@ require('tabnine').setup({ suggestion_color = {gui = "#808080", cterm = 244}, exclude_filetypes = {"TelescopePrompt", "NvimTree"}, log_file_path = nil, -- absolute path to Tabnine log file + ignore_certificate_errors = false, }) ``` @@ -246,7 +247,8 @@ require('tabnine').setup({ codelens_enabled = true, exclude_filetypes = {"TelescopePrompt", "NvimTree"}, log_file_path = nil, -- absolute path to Tabnine log file, - tabnine_enterprise_host = tabnine_enterprise_host + tabnine_enterprise_host = tabnine_enterprise_host, + ignore_certificate_errors = false, }) ``` diff --git a/lua/tabnine/binary.lua b/lua/tabnine/binary.lua index a8ed12d..703b058 100644 --- a/lua/tabnine/binary.lua +++ b/lua/tabnine/binary.lua @@ -60,6 +60,7 @@ local function optional_args() end function TabnineBinary:start() + local config = config.get_config() self.stdin = uv.new_pipe() self.stdout = uv.new_pipe() self.stderr = uv.new_pipe() @@ -70,6 +71,8 @@ function TabnineBinary:start() "--client-metadata", "ide-restart-counter=" .. self.restart_counter, "pluginVersion=" .. consts.plugin_version, + "--tls_config", + "insecure=" .. tostring(config.ignore_certificate_errors) }, optional_args()), stdio = { self.stdin, self.stdout, self.stderr }, }, function()