Skip to content

Commit

Permalink
feat: Add iced#nrepl#middleware_list
Browse files Browse the repository at this point in the history
cf. #214
  • Loading branch information
liquidz committed Sep 24, 2022
1 parent 9280124 commit 1f6c096
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions autoload/iced/nrepl.vim
Original file line number Diff line number Diff line change
Expand Up @@ -767,6 +767,17 @@ function! iced#nrepl#session_list(callback) abort
endfunction
" }}}

" LS-MIDDLEWARE {{{
function! iced#nrepl#middleware_list(callback) abort
" NOTE: remove the first two chars because middleware names start with "#'".
call iced#nrepl#send({
\ 'op': 'ls-middleware',
\ 'callback': {resp -> a:callback(map(empty(resp) ? [] : copy(get(resp, 'middleware', [])),
\ {_, v -> strpart(v, 2)}))},
\ })
endfunction
" }}}

" STATUS {{{
function! iced#nrepl#status() abort
if !iced#nrepl#is_connected()
Expand Down

0 comments on commit 1f6c096

Please sign in to comment.