Skip to content

Commit

Permalink
breaking: Remove support for nREPL's sideloader
Browse files Browse the repository at this point in the history
  • Loading branch information
liquidz committed Jun 12, 2024
1 parent c03a25f commit 0291db2
Show file tree
Hide file tree
Showing 7 changed files with 0 additions and 236 deletions.
10 changes: 0 additions & 10 deletions autoload/iced/nrepl.vim
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ let g:iced#nrepl#skip_evaluation_when_buffer_size_is_exceeded
let g:iced#nrepl#printer = get(g:, 'iced#nrepl#printer', 'default')
let g:iced#nrepl#path_translation = get(g:, 'iced#nrepl#path_translation', {})
let g:iced#nrepl#init_cljs_ns = get(g:, 'iced#nrepl#init_cljs_ns', 'cljs.user')
let g:iced#nrepl#enable_sideloader = get(g:, 'iced#nrepl#enable_sideloader', v:false)

let s:id_counter = 1
function! iced#nrepl#id() abort
Expand Down Expand Up @@ -271,7 +270,6 @@ function! s:dispatcher(ch, resp) abort
let future = iced#system#get('future')

let need_debug_input_response = ''
let sideloader_lookup_response = ''

for resp in responses
if type(resp) != v:t_dict
Expand All @@ -295,8 +293,6 @@ function! s:dispatcher(ch, resp) abort
for status in get(resp, 'status', [''])
if status ==# 'need-debug-input'
let need_debug_input_response = resp
elseif status ==# 'sideloader-lookup'
let sideloader_lookup_response = resp
endif
endfor
endfor
Expand Down Expand Up @@ -338,8 +334,6 @@ function! s:dispatcher(ch, resp) abort
call iced#buffer#stdout#open()
endif
call iced#nrepl#debug#start(need_debug_input_response)
elseif !empty(sideloader_lookup_response)
call iced#nrepl#sideloader#lookup(sideloader_lookup_response)
endif
endfunction
" }}}
Expand Down Expand Up @@ -419,10 +413,6 @@ function! s:warm_up() abort
call iced#nrepl#ns#load_current_file({_ -> ''})
endif
call iced#format#set_indentexpr()

if g:iced#nrepl#enable_sideloader && iced#nrepl#is_supported_op('sideloader-start')
call iced#nrepl#sideloader#start()
endif
endfunction

function! s:status(ch) abort
Expand Down
77 changes: 0 additions & 77 deletions autoload/iced/nrepl/sideloader.vim

This file was deleted.

6 changes: 0 additions & 6 deletions doc/pages/index.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -147,12 +147,6 @@ include::refactoring.adoc[]
[small]#<<top>>#
// }}}

include::sideloader.adoc[]
// back to top {{{
[.text-right]
[small]#<<top>>#
// }}}

include::static_analysis.adoc[]
// back to top {{{
[.text-right]
Expand Down
72 changes: 0 additions & 72 deletions doc/pages/sideloader.adoc

This file was deleted.

62 changes: 0 additions & 62 deletions doc/vim-iced.txt
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ CONTENTS *vim-iced-contents*
Format on writing files |vim-iced-formatting-on-writing-files|
Indenting |vim-iced-indenting|
Refactoring |vim-iced-refactoring|
Sideloader |vim-iced-sideloader|
Static analysis |vim-iced-static-analysis|
clj-kondo |vim-iced-static-analysis-clj-kondo|
Notification |vim-iced-notification|
Expand All @@ -62,7 +61,6 @@ CONTENTS *vim-iced-contents*
Command palettes |vim-iced-customizing-palette|
Hooks |vim-iced-customizing-hooks|
Popup window |vim-iced-customizing-popup-window|
Sideloader |vim-iced-customizing-sideloader|
Notification |vim-iced-customizing-notification|
Default keys |vim-iced-customizing-default-keys|
Changelog |vim-iced-changelog|
Expand Down Expand Up @@ -726,28 +724,6 @@ REFACTORING *vim-iced-refactoring*
See also:
- |g:iced#refactor#insert_newline_after_require|

==============================================================================
SIDELOADER *vim-iced-sideloader*

WARNING: `base64` command is required to use sideloader.

Sideloader is a new feature from nREPL 0.7, and enables injecting code
remotely in a running server on demand.

vim-iced provides following commands for sideloader:
- |:IcedStartSideloader|.
- |:IcedStoptSideloader|.

When nREPL requires to look up some codes,
vim-iced will search in |g:iced#source_root|.

It is assumed that sources under |g:iced#source_root| is managed by
tools such as `ghq`.
- https://github.com/x-motemen/ghq

vim-iced will use `find` or `fd` as a searching file program.
- https://github.com/sharkdp/fd

==============================================================================
STATIC ANALYSIS *vim-iced-static-analysis*

Expand Down Expand Up @@ -1461,22 +1437,6 @@ COMMANDS *vim-iced-commands*
If `let` form is not found in current top list, cursor is not moved.
Key is mapped to |<Plug>(iced_jump_to_let)|.

*:IcedStartSideloader*
:IcedStartSideloader
Start side-loading.
Key is mapped to |<Plug>(iced_start_sideloader)|.
See also |vim-iced-sideloader|.

*:IcedStopSideloader*
:IcedStopSideloader
Stop side-loading.
NOTE: nREPL does not provide the way to stop sideloader officially.
But sideloader is a session specific mode, so we can stop
sideloading by stopping to use current session.

Key is mapped to |<Plug>(iced_start_sideloader)|.
See also |vim-iced-sideloader|.

*:IcedYankNsName*
:IcedYankNsName
Yank the current namespace name into `"` register.
Expand Down Expand Up @@ -1947,14 +1907,6 @@ KEY MAPPINGS *vim-iced-key-mappings*
<Plug>(iced_jump_to_let)
Same as |:IcedJumpToLet|.

*<Plug>(iced_start_sideloader)*
<Plug>(iced_start_sideloader)
Same as |:IcedStartSideloader|.

*<Plug>(iced_stop_sideloader)*
<Plug>(iced_stop_sideloader)
Same as |:IcedStopSideloader|.

*<Plug>(iced_yank_ns_name)*
<Plug>(iced_yank_ns_name)
Same as |:IcedYankNsName|.
Expand Down Expand Up @@ -2733,20 +2685,6 @@ g:iced#popup#neovim#style
- https://neovim.io/doc/user/api.html#nvim_open_win()
Default value is `'minimal'`.

------------------------------------------------------------------------------
SIDELOADER *vim-iced-customizing-sideloader*


*g:iced#nrepl#enable_sideloader*
g:iced#nrepl#enable_sideloader
If `v:true`, vim-iced starts sideloader on startup automatically.
Default value is `v:false`.

*g:iced#source_root*
g:iced#source_root
If you have `ghq`, `git config ghq.root` will be the value automatically.
- https://github.com/x-motemen/ghq

------------------------------------------------------------------------------
NOTIFICATION *vim-iced-customizing-notification*

Expand Down
6 changes: 0 additions & 6 deletions ftplugin/clojure.vim
Original file line number Diff line number Diff line change
Expand Up @@ -197,9 +197,6 @@ command! IcedJumpToNextError call iced#system#get('sign').jump_to
command! IcedJumpToPrevError call iced#system#get('sign').jump_to_next({'name': iced#nrepl#test#sign_name()})
command! IcedJumpToLet call iced#let#jump_to_let()

command! IcedStartSideloader call iced#nrepl#sideloader#start()
command! IcedStopSideloader call iced#nrepl#sideloader#stop()

command! -nargs=? -complete=custom,iced#component#installer#complete
\ IcedUpdateTool call iced#system#get('installer').reinstall(<q-args>)

Expand Down Expand Up @@ -322,9 +319,6 @@ nnoremap <silent> <Plug>(iced_jump_to_next_sign) :<C-u>IcedJumpToNextSign
nnoremap <silent> <Plug>(iced_jump_to_prev_sign) :<C-u>IcedJumpToPrevSign<CR>
nnoremap <silent> <Plug>(iced_jump_to_let) :<C-u>IcedJumpToLet<CR>
nnoremap <silent> <Plug>(iced_start_sideloader) :<C-u>IcedStartSideloader<CR>
nnoremap <silent> <Plug>(iced_stop_sideloader) :<C-u>IcedStopSideloader<CR>
nnoremap <silent> <Plug>(iced_update_tool) :<C-u>IcedUpdateTool<CR>
"" }}}
Expand Down
3 changes: 0 additions & 3 deletions message/iced/en.txt
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@
'ns_not_found': '(ns ..) form is not found.',
'ns_vars_error': 'Failed to fetch ns vars.',
'popup_error': 'Failed to open popup: %s.',
'provided_sideloader': 'Provided %s as %s to sideloader.',
'quitted_cljs_repl': 'CLJS repl has quit.',
'reading': 'Still reading..',
'required': 'Required.',
Expand All @@ -98,9 +97,7 @@
'start_to_refresh': 'Start to refresh %s...',
'start_to_trace': 'Start to trace: %s.',
'started_cljs_repl': 'CLJS repl has started.',
'started_sideloader': 'Sideloader has started.',
'stop_to_trace': 'Stop to trace: %s.',
'stopped_sideloader': 'Sideloader has stopped.',
'test_summary': '%s: Ran %d assertions, in %d test functions. %d failures, %d errors.',
'testing': 'Testing...',
'testing_var': 'Testing: %s',
Expand Down

0 comments on commit 0291db2

Please sign in to comment.