From 4063291e335e74e9ee2be04beb47d40b376312fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=A9tan=20Lepage?= <33058747+GaetanLepage@users.noreply.github.com> Date: Wed, 3 Jan 2024 20:13:03 +0100 Subject: [PATCH] Feat: Add codeium_bin option (#292) --- autoload/codeium/server.vim | 8 ++++++++ doc/codeium.txt | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/autoload/codeium/server.vim b/autoload/codeium/server.vim index 94d40d62..edb4a8c1 100644 --- a/autoload/codeium/server.vim +++ b/autoload/codeium/server.vim @@ -122,6 +122,14 @@ function! s:SendHeartbeat(timer) abort endfunction function! codeium#server#Start(...) abort + let user_defined_codeium_bin = get(g:, 'codeium_bin', '') + + if user_defined_codeium_bin != '' && filereadable(user_defined_codeium_bin) + let s:bin = user_defined_codeium_bin + call s:ActuallyStart() + return + endif + silent let os = substitute(system('uname'), '\n', '', '') silent let arch = substitute(system('uname -m'), '\n', '', '') let is_arm = stridx(arch, 'arm') == 0 || stridx(arch, 'aarch64') == 0 diff --git a/doc/codeium.txt b/doc/codeium.txt index 7ecc7f6f..a738c63d 100644 --- a/doc/codeium.txt +++ b/doc/codeium.txt @@ -86,6 +86,14 @@ g:codeium_tab_fallback The fallback key when there is no suggestion display > let g:codeium_tab_fallback = "\t" < + *g:codeium_bin* +g:codeium_bin Manually set the path to the `codeium` language server + binary on your system. + If unset, `codeium.vim` will fetch and download the + binary from the internet. +> + let g:codeium_bin = "~/.local/bin/codeium_language_server" +< MAPS *codeium-maps*