Skip to content

Commit

Permalink
Merge pull request #386 from liquidz/dev
Browse files Browse the repository at this point in the history
3.8.1
  • Loading branch information
liquidz authored Feb 26, 2022
2 parents 0db2536 + 5da9f3e commit 7d88dcb
Show file tree
Hide file tree
Showing 7 changed files with 48 additions and 18 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/static.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v2
- uses: actions/setup-java@v3
with:
distribution: 'adopt'
java-version: '16'
Expand Down
9 changes: 9 additions & 0 deletions CHANGELOG.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@ All notable changes to this project will be documented in this file. This change

== Unreleased (dev)

== 3.8.1 (2022-02-27)
// {{{
=== Added
* Added support fro external selectors.

=== Changed
* Bumped cider-nrepl to 0.28.3.
// }}}

== 3.8.0 (2022-02-17)
// {{{
=== Added
Expand Down
27 changes: 17 additions & 10 deletions autoload/iced/component/selector.vim
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,32 @@ let s:save_cpo = &cpoptions
set cpoptions&vim

let s:selector = {
\ 'ctrlp': {'runtimepath': 'plugin/ctrlp.vim',
\ 'run': {config -> ctrlp#iced#start(config)}},
\ 'fzf': {'runtimepath': 'plugin/fzf.vim',
\ 'run': {config -> fzf#iced#start(config)}},
\ 'clap': {'runtimepath': 'plugin/clap.vim',
\ 'run': {config -> clap#provider#iced#start(config)}},
\ }
\ 'built_in': {
\ 'ctrlp': {'runtimepath': 'plugin/ctrlp.vim',
\ 'run': {config -> ctrlp#iced#start(config)}},
\ 'fzf': {'runtimepath': 'plugin/fzf.vim',
\ 'run': {config -> fzf#iced#start(config)}},
\ 'clap': {'runtimepath': 'plugin/clap.vim',
\ 'run': {config -> clap#provider#iced#start(config)}},
\ }}

let g:iced#selector#external = get(g:, 'iced#selector#external', {})
let g:iced#selector#search_order = get(g:, 'iced#selector#search_order', ['ctrlp', 'fzf', 'clap'])

function! s:selector.selectors() abort
return extend(copy(self.built_in), g:iced#selector#external)
endfunction

function! s:selector.select(config) abort
let selectors = self.selectors()
for target_name in g:iced#selector#search_order
if ! has_key(self, target_name)
if ! has_key(selectors, target_name)
call iced#message#error('unknown', target_name)
continue
endif

if globpath(&runtimepath, self[target_name]['runtimepath']) !=# ''
return self[target_name]['run'](a:config)
if globpath(&runtimepath, selectors[target_name]['runtimepath']) !=# ''
return selectors[target_name]['run'](a:config)
endif
endfor
return iced#message#error('no_selector')
Expand Down
2 changes: 1 addition & 1 deletion bin/iced
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ SCRIPT_DIR=$(cd $(dirname $0); pwd)
PROJECT_DIR=$(cd $SCRIPT_DIR; cd ..; pwd)
VERSION=$(grep 'Version: ' ${SCRIPT_DIR}/../doc/vim-iced.txt | cut -d' ' -f2)

BASE_DEPENDENCIES='nrepl/nrepl:0.9.0 refactor-nrepl/refactor-nrepl:3.3.2 cider/cider-nrepl:0.28.2 com.github.liquidz/iced-nrepl:1.2.8'
BASE_DEPENDENCIES='nrepl/nrepl:0.9.0 refactor-nrepl/refactor-nrepl:3.3.2 cider/cider-nrepl:0.28.3 com.github.liquidz/iced-nrepl:1.2.8'
BASE_MIDDLEWARES='cider.nrepl/wrap-classpath cider.nrepl/wrap-clojuredocs cider.nrepl/wrap-complete cider.nrepl/wrap-debug cider.nrepl/wrap-format cider.nrepl/wrap-info cider.nrepl/wrap-macroexpand cider.nrepl/wrap-ns cider.nrepl/wrap-out cider.nrepl/wrap-refresh cider.nrepl/wrap-spec cider.nrepl/wrap-test cider.nrepl/wrap-trace cider.nrepl/wrap-undef cider.nrepl/wrap-xref refactor-nrepl.middleware/wrap-refactor iced.nrepl/wrap-iced'

CLJS_DEPENDENCIES='cider/piggieback:0.5.3'
Expand Down
2 changes: 1 addition & 1 deletion deps.edn
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{:paths ["clj/repl"]
:deps {nrepl/nrepl {:mvn/version "0.9.0"}
refactor-nrepl/refactor-nrepl {:mvn/version "3.3.2"}
cider/cider-nrepl {:mvn/version "0.28.2"}
cider/cider-nrepl {:mvn/version "0.28.3"}
com.github.liquidz/iced-nrepl {:mvn/version "1.2.8"}}
:__middlewares__
["cider.nrepl/wrap-classpath"
Expand Down
22 changes: 18 additions & 4 deletions doc/vim-iced.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
*vim-iced.txt* Clojure interactive development environment for Vim8/Neovim

Version: 3.8.0
Version: 3.8.1
Author : Masashi Iizuka <[email protected]>
License: MIT LICENSE

Expand Down Expand Up @@ -140,7 +140,7 @@ LEININGEN~
{:user
{:dependencies [[nrepl "0.9.0"]
[com.github.liquidz/iced-nrepl "1.2.8"]
[cider/cider-nrepl "0.28.2"]]
[cider/cider-nrepl "0.28.3"]]
:repl-options {:nrepl-middleware [cider.nrepl/wrap-classpath
cider.nrepl/wrap-clojuredocs
cider.nrepl/wrap-complete
Expand Down Expand Up @@ -168,7 +168,7 @@ BOOT~
(swap! boot.repl/*default-dependencies* concat
'[[refactor-nrepl "3.3.2"]
[cider/cider-nrepl "0.28.2"]
[cider/cider-nrepl "0.28.3"]
[com.github.liquidz/iced-nrepl "1.2.8"]])
(swap! boot.repl/*default-middleware* concat
Expand Down Expand Up @@ -196,7 +196,7 @@ SHADOW-CLJS~
>
{
:dependencies [[refactor-nrepl "3.3.2"]
[cider/cider-nrepl "0.28.2"]
[cider/cider-nrepl "0.28.3"]
[com.github.liquidz/iced-nrepl "1.2.8"]]
}
<
Expand Down Expand Up @@ -2049,6 +2049,20 @@ g:iced#ns#class_map
<
Default value is `{}`.

*g:iced#selector#external*
g:iced#selector#external
Dictionary to define external selectors.
The key of dictionary is a selector name for
specifying |g:iced#selector#search_order|.
The value of dictionary is a selector definition as follows.
E.g. >
let g:iced#selector#external = {
\ 'selector_name': {'runtimepath': '/path/to/external/plugin',
\ 'run': {config -> your_function(config)}},
\ }
<
Default value is `{}`.

*g:iced#selector#search_order*
g:iced#selector#search_order
Search order for installed selectors.
Expand Down
2 changes: 1 addition & 1 deletion ftplugin/clojure.vim
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ if exists('g:loaded_vim_iced')
finish
endif
let g:loaded_vim_iced = 1
let g:vim_iced_version = 30800
let g:vim_iced_version = 30801
let g:vim_iced_home = expand('<sfile>:p:h:h')
" NOTE: https://github.com/vim/vim/commit/162b71479bd4dcdb3a2ef9198a1444f6f99e6843
" Add functions for defining and placing signs.
Expand Down

0 comments on commit 7d88dcb

Please sign in to comment.