Skip to content

Commit 82f2ba0

Browse files
authored
Feat: add codeium_os and codeium_arch options (Exafunction#341)
* Feat: add codeium_os and codeium_arch options * doc - fix indentation/tags
1 parent 6e6db3d commit 82f2ba0

File tree

2 files changed

+23
-3
lines changed

2 files changed

+23
-3
lines changed

autoload/codeium/server.vim

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,9 +129,16 @@ function! codeium#server#Start(...) abort
129129
call s:ActuallyStart()
130130
return
131131
endif
132+
let user_defined_os = get(g:, 'codeium_os', '')
133+
let user_defined_arch = get(g:, 'codeium_arch', '')
132134

133-
silent let os = substitute(system('uname'), '\n', '', '')
134-
silent let arch = substitute(system('uname -m'), '\n', '', '')
135+
if user_defined_os != '' && user_defined_arch != ''
136+
let os = user_defined_os
137+
let arch = user_defined_arch
138+
else
139+
silent let os = substitute(system('uname'), '\n', '', '')
140+
silent let arch = substitute(system('uname -m'), '\n', '', '')
141+
endif
135142
let is_arm = stridx(arch, 'arm') == 0 || stridx(arch, 'aarch64') == 0
136143

137144
if os ==# 'Linux' && is_arm

doc/codeium.txt

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,20 @@ g:codeium_bin Manually set the path to the `codeium` language server
9494
>
9595
let g:codeium_bin = "~/.local/bin/codeium_language_server"
9696
<
97-
97+
*g:codeium_os*
98+
g:codeium_os Manually set the host OS, accepted values are
99+
"Linux", "Darwin", "Windows". if unset, the value will
100+
be obtained using `uname`.
101+
>
102+
let g:codeium_os = "Linux"
103+
<
104+
*g:codeium_arch*
105+
g:codeium_arch Manually set the host architecture, accepted values
106+
are "x86_64", "aarch64", "arm". If unset, the value
107+
will be obtained using `uname -m`.
108+
>
109+
let g:codeium_arch = "x86_64"
110+
<
98111
MAPS *codeium-maps*
99112

100113
*codeium-i_<Tab>*

0 commit comments

Comments
 (0)