@@ -25,6 +25,7 @@ CONTENTS *vim-iced-contents*
25
25
Evaluating | vim-iced-evaluating |
26
26
Stdout Buffer | vim-iced-stdout-buffer |
27
27
Yank the result | vim-iced-yank-the-result |
28
+ Evaluating in context | vim-iced-eval-in-context |
28
29
Testing | vim-iced-testing |
29
30
Plain nREPL | vim-iced-testing-plain-nrepl |
30
31
Debugging | vim-iced-debugging |
@@ -138,8 +139,8 @@ LEININGEN~
138
139
$HOME/.lein/profile.clj
139
140
>
140
141
{:user
141
- {:dependencies [[nrepl "0.9 .0"]
142
- [com.github.liquidz/iced-nrepl "1.2.458 "]
142
+ {:dependencies [[nrepl "1.0 .0"]
143
+ [com.github.liquidz/iced-nrepl "1.2.462 "]
143
144
[cider/cider-nrepl "0.28.5"]]
144
145
:repl-options {:nrepl-middleware [cider.nrepl/wrap-classpath
145
146
cider.nrepl/wrap-clojuredocs
@@ -158,7 +159,7 @@ LEININGEN~
158
159
cider.nrepl/wrap-undef
159
160
cider.nrepl/wrap-xref
160
161
iced.nrepl/wrap-iced]}
161
- :plugins [[refactor-nrepl "3.5.4 "]]}}
162
+ :plugins [[refactor-nrepl "3.5.5 "]]}}
162
163
<
163
164
164
165
*vim-iced-manual-boot*
@@ -169,9 +170,9 @@ BOOT~
169
170
(require (quote boot.repl))
170
171
171
172
(swap! boot.repl/*default-dependencies* concat
172
- '[[refactor-nrepl "3.5.4 "]
173
+ '[[refactor-nrepl "3.5.5 "]
173
174
[cider/cider-nrepl "0.28.5"]
174
- [com.github.liquidz/iced-nrepl "1.2.458 "]])
175
+ [com.github.liquidz/iced-nrepl "1.2.462 "]])
175
176
176
177
(swap! boot.repl/*default-middleware* concat
177
178
'[cider.nrepl/wrap-classpath
@@ -199,9 +200,9 @@ SHADOW-CLJS~
199
200
shadow-cljs.edn
200
201
>
201
202
{
202
- :dependencies [[refactor-nrepl "3.5.4 "]
203
+ :dependencies [[refactor-nrepl "3.5.5 "]
203
204
[cider/cider-nrepl "0.28.5"]
204
- [com.github.liquidz/iced-nrepl "1.2.458 "]]
205
+ [com.github.liquidz/iced-nrepl "1.2.462 "]]
205
206
}
206
207
<
207
208
.nrepl.edn (local config) or $HOME/.nrepl/nrepl.edn (global config)
@@ -402,7 +403,7 @@ EVALUATING *vim-iced-evaluating*
402
403
- `<Leader> ei ` : Evaluate inner element
403
404
- `<Leader> ee` : Evaluate outer list
404
405
- `<Leader> et ` : Evaluate outer top list
405
- c.f . | vim-iced-customizing-default-keys |
406
+ cf . | vim-iced-customizing-default-keys |
406
407
407
408
Specific evaluation range(`|` means cursor position): >
408
409
;; <------------et----------->
@@ -445,7 +446,7 @@ YANK THE RESULT *vim-iced-yank-the-result*
445
446
446
447
Like vim's behavior, iced shifts the previous result of register 1 into
447
448
register 2, 2 into 3, and so forth.
448
-
449
+
449
450
If you have values you don't want to store,
450
451
See | g:iced#eval#values_to_skip_storing_register | .
451
452
@@ -461,6 +462,27 @@ YANK THE RESULT *vim-iced-yank-the-result*
461
462
" mapping for "xee
462
463
nmap <silent> ee <Plug>(iced_eval)<Plug>(sexp_outer_list)``
463
464
<
465
+ ------------------------------------------------------------------------------
466
+ EVALUATING IN CONTEXT *vim-iced-eval-in-context*
467
+
468
+ There are times when you want to evaluate the contents of a function
469
+ for confirmation.
470
+ >
471
+ (defn greet [s]
472
+ (str "hello " s))
473
+ <
474
+ It is tired to bind arguments separately, (e.g. `(def s "iced")`)
475
+ or to write function calls in the comment form every time.
476
+ (e.g. `(comment (greet "iced"))`)
477
+
478
+ This is where evaluating codes in context help you.
479
+
480
+ There is a default key bindings to evaluate code in a context.
481
+ - `<Leader> ece` : Evaluate outer list in a context
482
+ cf. | vim-iced-customizing-default-keys |
483
+
484
+ See | <Plug>(iced_eval_in_context) | for more information.
485
+
464
486
==============================================================================
465
487
TESTING *vim-iced-testing*
466
488
@@ -579,7 +601,8 @@ JUMP TO DEFINITION *vim-iced-tag-jump* *vim-iced-jump-to-def
579
601
| :IcedDefJump | to jump to definition.
580
602
It is also supported to jump to qualified keywords and local vars.
581
603
582
- If the jump destination for keyword is inaccurate or the jump is slow, enabling clj-kondo feature may improve the result.
604
+ If the jump destination for keyword is inaccurate or the jump is slow,
605
+ enabling clj-kondo feature may improve the result.
583
606
- | vim-iced-static-analysis-clj-kondo |
584
607
585
608
To jump back, you can use default key mapping(<C-t> ).
@@ -714,6 +737,11 @@ CLJ-KONDO *vim-iced-static-analysis-clj-kondo*
714
737
This can be used to support jumping to local vars.
715
738
To enable, see | g:iced_enable_clj_kondo_local_analysis | .
716
739
740
+ ANALYSIS DIRECTORIES
741
+ vim-iced uses the project root directory for analysis by default.
742
+ If you want to analyze files only in specific directories,
743
+ see | g:iced_clj_kondo_analysis_dirs | .
744
+
717
745
TIPS
718
746
- Cached files will be separated to var definition/usage and
719
747
ns definition/usage automatically if you have `jq` or `jet` .
@@ -1086,7 +1114,7 @@ COMMANDS *vim-iced-commands*
1086
1114
*:IcedJavaDocument*
1087
1115
:IcedJavaDocument [{class_name}]
1088
1116
Opens a browser window displaying the javadoc for {class_name}.
1089
- c.f . https://clojuredocs.org/clojure.java.javadoc/javadoc
1117
+ cf . https://clojuredocs.org/clojure.java.javadoc/javadoc
1090
1118
1091
1119
If {class_name} is not passed,
1092
1120
the result of `clojure.core/class ` for the form under cursor is used.
@@ -1177,7 +1205,7 @@ COMMANDS *vim-iced-commands*
1177
1205
:IcedFormatSync
1178
1206
Same as | :IcedFormat | , but it's done synchronously.
1179
1207
Key is mapped to | <Plug>(iced_format_sync) | .
1180
-
1208
+
1181
1209
*:IcedFormatSyncAll*
1182
1210
:IcedFormatSyncAll
1183
1211
Same as | :IcedFormatAll | , but it's done synchronously.
@@ -1492,6 +1520,17 @@ KEY MAPPINGS *vim-iced-key-mappings*
1492
1520
<Plug>(iced_eval_and_comment)<Plug>(sexp_outer_list)``
1493
1521
<Plug>(iced_eval_and_comment)<Plug>(sexp_outer_top_list)``
1494
1522
<
1523
+ *<Plug>(iced_eval_in_context)*
1524
+ <Plug> (iced_eval_in_context)
1525
+ Evaluate code in the user specified context.
1526
+ The context is `clojure.core/let ` style.
1527
+ For example, the context `foo "bar" num 10` will be expanded to
1528
+ `(clojure.core/let [foo "bar" num 10] ...)`.
1529
+
1530
+ The input context is saved and will be expanded at the next evaluation.
1531
+
1532
+ See also | vim-iced-eval-in-context | .
1533
+
1495
1534
*<Plug>(iced_eval_ns)*
1496
1535
<Plug> (iced_eval_ns)
1497
1536
Same as | :IcedEvalNs | .
@@ -1907,7 +1946,7 @@ g:iced#eval#mark_at_last
1907
1946
g:iced#eval#values_to_skip_storing_register
1908
1947
Evaluated values not to store to numbered registers.
1909
1948
Default value is `['nil' , 'true' , 'false' ]`.
1910
-
1949
+
1911
1950
*g:iced#eval#popup_highlight*
1912
1951
g:iced#eval#popup_highlight
1913
1952
The highlight setting for popup to display evaluated result.
@@ -1961,7 +2000,7 @@ g:iced#grep#format
1961
2000
*g:iced#refactor#prefix_rewriting*
1962
2001
g:iced#refactor#prefix_rewriting
1963
2002
Should `clean- ns` favor prefix forms in the ns macro?
1964
- c.f . https://github.com/clojure-emacs/refactor-nrepl#available-features
2003
+ cf . https://github.com/clojure-emacs/refactor-nrepl#available-features
1965
2004
Default value is `v: false ` .
1966
2005
1967
2006
*g:iced#refactor#insert_newline_after_require*
@@ -2056,6 +2095,13 @@ g:iced_enable_clj_kondo_local_analysis
2056
2095
Default value is `v: false ` .
2057
2096
See also | vim-iced-static-analysis-clj-kondo | .
2058
2097
2098
+ *g:iced_clj_kondo_analysis_dirs*
2099
+ g:iced_clj_kondo_analysis_dirs
2100
+ If some values are set, vim-iced uses these directories for analysis
2101
+ by clj-kondo.
2102
+ If this option is empty, vim-iced uses the project root directory.
2103
+ Default value is `[]` .
2104
+
2059
2105
*g:iced#navigate#prefer_local_jump*
2060
2106
g:iced#navigate#prefer_local_jump
2061
2107
If {v:true} , change the behavior of | :IcedDefJump | to prefer local jumping.
@@ -2438,7 +2484,7 @@ CONNECT PREPARED *hook_event_connect_prepared*
2438
2484
2439
2485
Hooked before the start of connection.
2440
2486
This hook only allows `function ` hook type.
2441
- c.f . | hook_report_function |
2487
+ cf . | hook_report_function |
2442
2488
2443
2489
Following list is passed to reporter.
2444
2490
e.g. `[{'label' : 'nREPL', 'type' : 'nrepl' , 'port' : 12345}]`
@@ -2601,6 +2647,7 @@ g:iced_enable_default_key_mappings
2601
2647
n <Leader> " <Plug> (iced_jack_in)
2602
2648
n <Leader> ei <Plug> (iced_eval)<Plug> (sexp_inner_element)``
2603
2649
n <Leader> ee <Plug> (iced_eval)<Plug> (sexp_outer_list)``
2650
+ n <Leader> ece <Plug> (iced_eval_in_context)<Plug> (sexp_outer_list)``
2604
2651
n <Leader> et <Plug> (iced_eval_outer_top_list)
2605
2652
n <Leader> ea <Plug> (iced_eval_at_mark)
2606
2653
n <Leader> el <Plug> (iced_eval_last_outer_top_list)
0 commit comments