-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #10 from vim-denops/support-v4
Support denops v4
- Loading branch information
Showing
5 changed files
with
52 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
function! denops_shared_server#util#script_path(path) abort | ||
try | ||
" Denops v4 or later | ||
return denops#_internal#path#script([a:path]) | ||
catch /^Vim\%((\a\+)\)\=:E117:/ | ||
" Denops v3 or prior | ||
return denops#util#script_path(a:path) | ||
endtry | ||
endfunction | ||
|
||
function! denops_shared_server#util#info(...) abort | ||
call s:echomsg('None', a:000) | ||
endfunction | ||
|
||
function! denops_shared_server#util#error(...) abort | ||
call s:echomsg('ErrorMsg', a:000) | ||
endfunction | ||
|
||
function! s:echomsg(hl, msg) abort | ||
execute printf('echohl %s', a:hl) | ||
for l:line in split(join(a:msg), '\n') | ||
echomsg printf('[denops-shared-server] %s', l:line) | ||
endfor | ||
echohl None | ||
endfunction |