From f74306ea57e0c139045ca4ca1661a5a36e4ef485 Mon Sep 17 00:00:00 2001 From: Rahul Sridhar Date: Fri, 4 Oct 2024 16:22:23 -0700 Subject: [PATCH] Vim fixes (#461) * Vim fixes * fix --- autoload/codeium/doc.vim | 3 +-- autoload/codeium/server.vim | 6 +++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/autoload/codeium/doc.vim b/autoload/codeium/doc.vim index b50b8b59..8084d089 100644 --- a/autoload/codeium/doc.vim +++ b/autoload/codeium/doc.vim @@ -103,8 +103,7 @@ function! codeium#doc#GetDocument(bufId, curLine, curCol) abort \ 'editor_language': editor_language, \ 'language': get(s:language_enum, language, 0), \ 'cursor_position': {'row': a:curLine - 1, 'col': a:curCol - 1}, - \ 'absolute_path': fnamemodify(bufname(a:bufId), ':p'), - \ 'relative_path': fnamemodify(bufname(a:bufId), ':') + \ 'absolute_path_migrate_me_to_uri': fnamemodify(bufname(a:bufId), ':p'), \ } let line_ending = codeium#util#LineEndingChars(v:null) diff --git a/autoload/codeium/server.vim b/autoload/codeium/server.vim index a841a9e6..01681b32 100644 --- a/autoload/codeium/server.vim +++ b/autoload/codeium/server.vim @@ -185,9 +185,13 @@ function! codeium#server#Start(...) abort let config = get(g:, 'codeium_server_config', {}) if has_key(config, 'portal_url') && !empty(config.portal_url) let response = system('curl -s ' . config.portal_url . '/api/version') - if v:shell_error != 0 + if v:shell_error let s:language_server_version = response let s:language_server_sha = 'enterprise-' . s:language_server_version + else + call codeium#log#Error('Failed to fetch version from ' . config.portal_url) + call codeium#log#Error(v:shell_error) + call codeium#log#Error(v:stderr) endif endif