From fd440cd718742daab162241c5bd5857cd92f5f72 Mon Sep 17 00:00:00 2001 From: Rahul Sridhar Date: Thu, 1 Feb 2024 15:04:26 -0800 Subject: [PATCH] Project import generated by Copybara. (#312) GitOrigin-RevId: 8708c2828657463e742a3e75b673d403bcaf88d5 Co-authored-by: Copybara Bot --- autoload/codeium/server.vim | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/autoload/codeium/server.vim b/autoload/codeium/server.vim index 46501eaa..49019675 100644 --- a/autoload/codeium/server.vim +++ b/autoload/codeium/server.vim @@ -1,5 +1,5 @@ -let s:language_server_version = '1.6.20' -let s:language_server_sha = 'c8aabc8753a3cea9d68cda55f9395290bdf75942' +let s:language_server_version = '1.6.28' +let s:language_server_sha = 'f485965568948013d9f47815917f2f1f3a99089d' let s:root = expand(':h:h:h') let s:bin = v:null @@ -154,7 +154,14 @@ function! codeium#server#Start(...) abort if !filereadable(s:bin) call delete(s:bin) if sha ==# s:language_server_sha - let url = 'https://github.com/Exafunction/codeium/releases/download/language-server-v' . s:language_server_version . '/language_server_' . bin_suffix . '.gz' + let config = get(g:, 'codeium_server_config', {}) + if has_key(config, 'portal_url') && !empty(config.portal_url) + let base_url = config.portal_url + else + let base_url = 'https://github.com/Exafunction/codeium/releases/download' + endif + let base_url = substitute(base_url, '/\+$', '', '') + let url = base_url . '/language-server-v' . s:language_server_version . '/language_server_' . bin_suffix . '.gz' else let url = 'https://storage.googleapis.com/exafunction-dist/codeium/' . sha . '/language_server_' . bin_suffix . '.gz' endif