Skip to content

Commit

Permalink
Add verbose option to nrepl#connect
Browse files Browse the repository at this point in the history
  • Loading branch information
liquidz committed Dec 2, 2020
1 parent 9d3e96d commit c097f4d
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions autoload/iced/nrepl.vim
Original file line number Diff line number Diff line change
Expand Up @@ -446,6 +446,8 @@ function! s:connected(resp, opts) abort
endfunction

function! iced#nrepl#connect(port, ...) abort
let opts = get(a:, 1, {})

if iced#nrepl#is_connected()
call iced#message#info('already_connected')
return v:true
Expand Down Expand Up @@ -475,12 +477,13 @@ function! iced#nrepl#connect(port, ...) abort

if !iced#nrepl#is_connected()
let s:nrepl['channel'] = v:false
call iced#message#error('connect_error')
if get(opts, 'verbose', v:true)
call iced#message#error('connect_error')
endif
return v:false
endif
endif

let opts = get(a:, 1, {})
let resp = iced#promise#sync('iced#nrepl#clone', [])
call s:connected(resp, opts)
return v:true
Expand Down

0 comments on commit c097f4d

Please sign in to comment.