1- let s: language_server_version = ' 1.6.28 '
2- let s: language_server_sha = ' f485965568948013d9f47815917f2f1f3a99089d '
1+ let s: language_server_version = ' 1.2.104 '
2+ let s: language_server_sha = ' ab59278dfa738977096f6bfc2299d9941fcc3252 '
33let s: root = expand (' <sfile>:h:h:h' )
44let s: bin = v: null
55
@@ -31,7 +31,7 @@ function! s:OnExit(result, status, on_complete_cb) abort
3131 let did_close = has_key (a: result , ' closed' )
3232 if did_close
3333 call remove (a: result , ' closed' )
34- call a: on_complete_cb (a: result .out, a: result .err, a: status )
34+ call a: on_complete_cb (a: result .out, a: status )
3535 else
3636 " Wait until we receive OnClose, and call on_complete_cb then.
3737 let a: result .exit_status = a: status
@@ -41,7 +41,7 @@ endfunction
4141function ! s: OnClose (result, on_complete_cb) abort
4242 let did_exit = has_key (a: result , ' exit_status' )
4343 if did_exit
44- call a: on_complete_cb (a: result .out, a: result .err, a: result . exit_status)
44+ call a: on_complete_cb (a: result .out, a: result .exit_status)
4545 else
4646 " Wait until we receive OnExit, and call on_complete_cb then.
4747 let a: result .closed = v: true
@@ -65,21 +65,20 @@ function! codeium#server#Request(type, data, ...) abort
6565 if s: server_port is # v: null
6666 throw ' Server port has not been properly initialized.'
6767 endif
68- let uri = ' http://127.0.0.1 :' . s: server_port .
68+ let uri = ' http://localhost :' . s: server_port .
6969 \ ' /exa.language_server_pb.LanguageServerService/' . a: type
7070 let data = json_encode (a: data )
7171 let args = [
7272 \ ' curl' , uri,
7373 \ ' --header' , ' Content-Type: application/json' ,
7474 \ ' -d@-'
7575 \ ]
76- let result = {' out' : [], ' err ' : [] }
76+ let result = {' out' : []}
7777 let ExitCallback = a: 0 && ! empty (a: 1 ) ? a: 1 : function (' s:NoopCallback' )
7878 if has (' nvim' )
7979 let jobid = jobstart (args , {
8080 \ ' on_stdout' : { channel, data, t - > add (result.out, join (data, " \n " )) },
81- \ ' on_stderr' : { channel, data, t - > add (result.err, join (data, " \n " )) },
82- \ ' on_exit' : { job, status, t - > ExitCallback (result.out, result.err, status) },
81+ \ ' on_exit' : { job, status, t - > ExitCallback (result.out, status) },
8382 \ })
8483 call chansend (jobid, data)
8584 call chanclose (jobid, ' stdin' )
@@ -89,7 +88,6 @@ function! codeium#server#Request(type, data, ...) abort
8988 \ ' in_mode' : ' raw' ,
9089 \ ' out_mode' : ' raw' ,
9190 \ ' out_cb' : { channel, data - > add (result.out, data) },
92- \ ' err_cb' : { channel, data - > add (result.err, data) },
9391 \ ' exit_cb' : { job, status - > s: OnExit (result, status, ExitCallback) },
9492 \ ' close_cb' : { channel - > s: OnClose (result, ExitCallback) }
9593 \ })
@@ -122,14 +120,6 @@ function! s:SendHeartbeat(timer) abort
122120endfunction
123121
124122function ! codeium#server#Start (... ) abort
125- let user_defined_codeium_bin = get (g: , ' codeium_bin' , ' ' )
126-
127- if user_defined_codeium_bin != ' ' && filereadable (user_defined_codeium_bin)
128- let s: bin = user_defined_codeium_bin
129- call s: ActuallyStart ()
130- return
131- endif
132-
133123 silent let os = substitute (system (' uname' ), ' \n' , ' ' , ' ' )
134124 silent let arch = substitute (system (' uname -m' ), ' \n' , ' ' , ' ' )
135125 let is_arm = stridx (arch, ' arm' ) == 0 || stridx (arch, ' aarch64' ) == 0
@@ -154,14 +144,7 @@ function! codeium#server#Start(...) abort
154144 if ! filereadable (s: bin )
155145 call delete (s: bin )
156146 if sha == # s: language_server_sha
157- let config = get (g: , ' codeium_server_config' , {})
158- if has_key (config, ' portal_url' ) && ! empty (config.portal_url)
159- let base_url = config.portal_url
160- else
161- let base_url = ' https://github.com/Exafunction/codeium/releases/download'
162- endif
163- let base_url = substitute (base_url, ' /\+$' , ' ' , ' ' )
164- let url = base_url . ' /language-server-v' . s: language_server_version . ' /language_server_' . bin_suffix . ' .gz'
147+ let url = ' https://github.com/Exafunction/codeium/releases/download/language-server-v' . s: language_server_version . ' /language_server_' . bin_suffix . ' .gz'
165148 else
166149 let url = ' https://storage.googleapis.com/exafunction-dist/codeium/' . sha . ' /language_server_' . bin_suffix . ' .gz'
167150 endif
0 commit comments