Giter VIP home page Giter VIP logo

vim-iced's Introduction

vim-iced

logo
Clojure Interactive Development Environment for Vim8/Neovim.

GitHub release GitHub license Powered by vital.vim
GitHub Actions for vim/neovim workflow GitHub Actions for dependencies workflow Codecov

Warning

This project is in maintenance mode. New features will not be added.

Now Iโ€™m developing vim-elin as the main project, so please look forward to it.

Requirements

  • Vim 8.1.0614 or later, Neovim 0.4.0 or later.

  • Clojure 1.8 or later.

    • 1.10 or later is recommended.

  • No python! (boost possible with if_python3)

Features

โšก

Asynchronous evaluation

powered by channel in Vim8 / Neovim

๐Ÿ”ฅ

Testing

Run test under cursor
Run tests in namespace
Re run failed/last test
Also supports kaocha by vim-iced-kaocha

๐Ÿš€

Refactoring

Clean namespace
Add missing
Thread first/last
Extract function
Move to let
Rename symbol

๐Ÿ’ญ

Auto completion

Provided by following external plugins.
- vim-iced-coc-source for coc.nvim
- vim-iced-asyncomplete for asyncomplete.vim
- cmp-iced for nvim-cmp
Omni completion is provided by default.

๐Ÿ“

Formatting

Supports followings currently.
- cljfmt via nREPL
- cljstyle
- zprint
- joker

๐Ÿ”

Reference

Docs, Javadoc, and ClojureDocs ๐ŸŽฅ
Function dependencies and references ๐ŸŽฅ

๐Ÿœ

Debugging

Supports cider-nreplโ€™s debugger ๐ŸŽฅ
Browsing tapped values ๐ŸŽฅ

๐Ÿ““

Skeleton

Provides code skeleton when you open new file

๐ŸŽฉ

ClojureScript support

Supports followings currently.
- Figwheel Main, lein-figwheel
- shadow-cljs

๐Ÿ˜Ž

Static analysis

Boost performance with static analysis powered by clj-kondo

๐Ÿ”Œ

Socket REPL

Supports minimal operations.

๐ŸŽจ

Command palette

Access commands smoothly and define user custom commands

Note
vim-iced is heavily powered by cider-nrepl, refactor-nrepl, and iced-nrepl.

External plugins

๐Ÿ”ฅ

vim-iced-kaocha

Provides some commands for testing with kaocha.

๐Ÿ”

vim-iced-project-namespaces

Provides :IcedBrowseNamespace command for jumping to namespace in your project.

vim-iced-function-list

Provides :IcedBrowseFunction command for jumping to functions in current namespace.

๐Ÿ’ญ

vim-iced-coc-source

Provides auto completion by coc.nvim.

vim-iced-asyncomplete

Provides auto completion by asyncomplete.vim.

vim-iced-ncm2

Provides auto completion by ncm2.

vim-iced-compe

Provides auto completion by nvim-compe.

๐Ÿœ

vim-iced-fern-debugger

Provides tree views for debugging results and tapped values by fern.vim.

๐Ÿ“š

https://github.com/liquidz/vim-iced-multi-session

Provides multi session support like connecting to nREPL and shadow-cljs.

License

Copyright (c) 2018-2024 Masashi Iizuka

Distributed under the MIT License.

vim-iced's People

Contributors

bbatsov avatar bootleq avatar christoph-frick avatar cnly avatar futurile avatar igrep avatar knubie avatar lagenorhynque avatar liquidz avatar lispyclouds avatar matthias-margush avatar micheam avatar pinealan avatar r6eve avatar rinx avatar risto-stevcev avatar rwaweber avatar stevejmp avatar tami5 avatar thejoeschr avatar victorb avatar yatesco avatar yngwarr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

vim-iced's Issues

Unable to resolve var: cider.nrepl/wrap-undef

Hi. I'm currently getting this error running iced repl in a fresh lein new hello-world. I don't have any ~/.lein/profiles.clj.

Exception in thread "main" Syntax error compiling var at (/private/var/folders/pt/0w3fhml53wd24yhxn4rxpj7r0000gn/T/form-init4596740160835148845.clj:1:6545).
        at clojure.lang.Compiler.analyzeSeq(Compiler.java:7114)
        at clojure.lang.Compiler.analyze(Compiler.java:6789)
        at clojure.lang.Compiler.analyze(Compiler.java:6745)
        at clojure.lang.Compiler$InvokeExpr.parse(Compiler.java:3888)
        at clojure.lang.Compiler.analyzeSeq(Compiler.java:7108)
        at clojure.lang.Compiler.analyze(Compiler.java:6789)
        at clojure.lang.Compiler.analyze(Compiler.java:6745)
        at clojure.lang.Compiler$InvokeExpr.parse(Compiler.java:3888)
        at clojure.lang.Compiler.analyzeSeq(Compiler.java:7108)
        at clojure.lang.Compiler.analyze(Compiler.java:6789)
        at clojure.lang.Compiler.access$300(Compiler.java:38)
        at clojure.lang.Compiler$LetExpr$Parser.parse(Compiler.java:6384)
        at clojure.lang.Compiler.analyzeSeq(Compiler.java:7106)
        at clojure.lang.Compiler.analyze(Compiler.java:6789)
        at clojure.lang.Compiler.analyze(Compiler.java:6745)
        at clojure.lang.Compiler$BodyExpr$Parser.parse(Compiler.java:6120)
        at clojure.lang.Compiler$FnMethod.parse(Compiler.java:5467)
        at clojure.lang.Compiler$FnExpr.parse(Compiler.java:4029)
        at clojure.lang.Compiler.analyzeSeq(Compiler.java:7104)
        at clojure.lang.Compiler.analyze(Compiler.java:6789)
        at clojure.lang.Compiler.eval(Compiler.java:7173)
        at clojure.lang.Compiler.eval(Compiler.java:7166)
        at clojure.lang.Compiler.eval(Compiler.java:7166)
        at clojure.lang.Compiler.eval(Compiler.java:7166)
        at clojure.lang.Compiler.load(Compiler.java:7635)
        at clojure.lang.Compiler.loadFile(Compiler.java:7573)
        at clojure.main$load_script.invokeStatic(main.clj:452)
        at clojure.main$init_opt.invokeStatic(main.clj:454)
        at clojure.main$init_opt.invoke(main.clj:454)
        at clojure.main$initialize.invokeStatic(main.clj:485)
        at clojure.main$null_opt.invokeStatic(main.clj:519)
        at clojure.main$null_opt.invoke(main.clj:516)
        at clojure.main$main.invokeStatic(main.clj:598)
        at clojure.main$main.doInvoke(main.clj:561)
        at clojure.lang.RestFn.applyTo(RestFn.java:137)
        at clojure.lang.Var.applyTo(Var.java:705)
        at clojure.main.main(main.java:37)
Caused by: java.lang.RuntimeException: Unable to resolve var: cider.nrepl/wrap-undef in this context
        at clojure.lang.Util.runtimeException(Util.java:221)
        at clojure.lang.Compiler$TheVarExpr$Parser.parse(Compiler.java:720)
        at clojure.lang.Compiler.analyzeSeq(Compiler.java:7106)
        ... 36 more

#dbg error

I was trying the debugging feature, but wasn't able to get it to work. This is the error:

CompilerException java.lang.RuntimeException: Unable to resolve symbol: STATE__ in this context, compiling:(/Users/matthiasmargush/code/hello-lein/src/hello_lein/core.clj:8:10) 

I am trying the example in the docs:

(defn fib
  ([n] (fib 0 1 n))
  ([a b n]
   (if (<= n 0)
    a
    #dbg (recur b (+ a b) (dec n)))))

(comment
  (fib 10))

CompilerException java.lang.Run... symbol: STATE__ in this context

calculating coverage is breaking

covimerage fails

Traceback (most recent call last):
  File "/tmp/workspace/venv/bin/covimerage", line 11, in <module>
    sys.exit(main())
  File "/tmp/workspace/venv/lib/python3.6/site-packages/click/core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "/tmp/workspace/venv/lib/python3.6/site-packages/click/core.py", line 717, in main
    rv = self.invoke(ctx)
  File "/tmp/workspace/venv/lib/python3.6/site-packages/click/core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/tmp/workspace/venv/lib/python3.6/site-packages/click/core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/tmp/workspace/venv/lib/python3.6/site-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/tmp/workspace/venv/lib/python3.6/site-packages/covimerage/cli.py", line 59, in write_coverage
    m.add_profile_files(*profile_file)
  File "/tmp/workspace/venv/lib/python3.6/site-packages/covimerage/__init__.py", line 92, in add_profile_files
    p.parse()
  File "/tmp/workspace/venv/lib/python3.6/site-packages/covimerage/__init__.py", line 340, in parse
    return self._parse(self._fobj)
  File "/tmp/workspace/venv/lib/python3.6/site-packages/covimerage/__init__.py", line 428, in _parse
    self.map_functions(functions)
  File "/tmp/workspace/venv/lib/python3.6/site-packages/covimerage/__init__.py", line 434, in map_functions
    if self.map_function(f):
  File "/tmp/workspace/venv/lib/python3.6/site-packages/covimerage/__init__.py", line 476, in map_function
    assert 0, 'Script line matches function line.'
AssertionError: Script line matches function line.

See stacktrace when test throws exception?

Running:

(defn foo
  "I don't do a whole lot."
  []
  (throw (ex-info "Fix me, I fail." {})))

(deftest a-test
  (testing "FIXME, I fail."
    (is (foo))))

Results in a test summary (as expected):

;; a-test: FIXME, I fail.
expected: (foo)
  actual: clojure.lang.ExceptionInfo: Fix me, I fail. {}

Is there a way to inspect the exception and see the stack trace?

Feature request: eval motion

IcedEvalVisual and friends are nice but would be really nice if I could eval a motion. I'm basically trying to replicate some of fireplace's cp.. mappings since that's what I've used for years, so e.g. cpaw would eval around word, or cpab would eval around parens.

Disabling paredit

Apologies if I overlooked something obvious, but is there a way to disable paredit mode? If not, would you consider adding an option for that?

Not Found error when testing namespace

I'm trying out vim-iced on my project, using https://github.com/yetibot/yetibot.core/blob/master/test/yetibot/core/test/commands/render.clj as an example test.

I'm using the default key mappings.

  1. I try <Leader>tn and it givevs me Not found.
  2. I try <Leader>tt on line 10 (or any line) and it gives me No test vars.
  3. I try <Leader>rcn to clean and unexpectedly it removes my [yetibot.core.commands.render :refer :all] require, which is the ns under test. Not sure why?

I can <Leader>eb or <Leader>eB and those both work.

First require locks up neovim for ~10 seconds

After :IcedConnect the first :IcedRequire locks up neovim for about 10 seconds. During this time I can't move the cursor or do anything inside neovim. After that subsequent :IcedRequires run nearly instantly.

NVIM v0.3.2-996-g55c518588
Terminal: kitty 0.13.1

Ref #77

ncat not needed since Nvim 0.2.2

Nvim now has a sockconnect() function, so ncat should not be needed.

If you need to support older versions of Nvim, you can use has('nvim-0.2.2') to check the version (or exists('*sockconnect')).

Eval visual selection

When I'm demoing code, I like to visually select what I'm eval-ing, so it's clearer on the screen. I didn't see anything like that yet in vim-iced (or if it's there, let me know.) I added this to my config based on the example in :help :map-operator. Would this be useful to have in vim-iced?

function! ClojureEval(type, ...)
	let sel_save = &selection
	let &selection = "inclusive"
	let reg_save = @@
	if a:0  " Invoked from Visual mode, use '< and '> marks.
		silent exe "normal! `<" . a:type . "`>y"
	elseif a:type == 'line'
		silent exe "normal! '[V']y"
	elseif a:type == 'block'
		silent exe "normal! `[\<C-V>`]y"
	else
		silent exe "normal! `[v`]y"
	endif

	call iced#nrepl#eval#repl(@@)

	let &selection = sel_save
	let @@ = reg_save
endfunction

vnoremap <silent> <buffer> (my key binding) :<c-u>call ClojureEval(visualmode(), 1)<cr>

Error running iced repl on clojure cli projects

Hi, iced repl works great on Lein projects but when I'm trying to run it on clj projects I get the following error:

grep: /usr/local/bin/../doc/vim-iced.txt: No such file or directory
OK: Clojure CLI project is detected
Error building classpath. Manifest type not detected when finding deps for iced-repl/iced-repl in coordinate #:local{:root "/usr/local"}

This happens on both clojure and clojurescript projects. Have tried passing --force-clojure-cli.

Using latest master vim-iced on neovim 0.4.0-dev
I'm sure there is some configuration issue on my side but if you can think of any pointers I would appreciate it!

As always, thanks for building this! Cheers!

Doesn't work

$ iced repl
OK: Leiningen project is detected
Retrieving cider/piggieback/0.3.10/piggieback-0.3.10.pom from clojars
Retrieving nrepl/nrepl/0.4.4/nrepl-0.4.4.pom from clojars
Retrieving org/clojure/tools.logging/0.4.1/tools.logging-0.4.1.pom from central
Retrieving iced-nrepl/iced-nrepl/0.4.1/iced-nrepl-0.4.1.pom from clojars
Retrieving nrepl/nrepl/0.5.3/nrepl-0.5.3.pom from clojars
Retrieving nrepl/bencode/1.0.0/bencode-1.0.0.pom from clojars
Retrieving refactor-nrepl/refactor-nrepl/2.4.0/refactor-nrepl-2.4.0.pom from clojars
Retrieving cider/cider-nrepl/0.20.0/cider-nrepl-0.20.0.pom from clojars
Retrieving cider/orchard/0.4.0/orchard-0.4.0.pom from clojars
Retrieving org/tcrawley/dynapath/0.2.5/dynapath-0.2.5.pom from central
Retrieving org/clojure/java.classpath/0.3.0/java.classpath-0.3.0.pom from central
Retrieving org/clojure/tools.namespace/0.3.0-alpha4/tools.namespace-0.3.0-alpha4.pom from central
Retrieving thunknyc/profile/0.5.2/profile-0.5.2.pom from clojars
Retrieving mvxcvi/puget/1.0.2/puget-1.0.2.pom from clojars
Retrieving mvxcvi/arrangement/1.1.1/arrangement-1.1.1.pom from clojars
Retrieving fipp/fipp/0.6.10/fipp-0.6.10.pom from clojars
Retrieving fipp/fipp/0.6.14/fipp-0.6.14.pom from clojars
Retrieving org/clojure/core.rrb-vector/0.0.13/core.rrb-vector-0.0.13.pom from central
Retrieving compliment/compliment/0.3.8/compliment-0.3.8.pom from clojars
Retrieving cljs-tooling/cljs-tooling/0.3.1/cljs-tooling-0.3.1.pom from clojars
Retrieving cljfmt/cljfmt/0.6.1/cljfmt-0.6.1.pom from clojars
Retrieving org/clojure/tools.cli/0.3.7/tools.cli-0.3.7.pom from central
Retrieving org/clojure/tools.reader/1.2.2/tools.reader-1.2.2.pom from central
Retrieving com/googlecode/java-diff-utils/diffutils/1.3.0/diffutils-1.3.0.pom from central
Retrieving rewrite-clj/rewrite-clj/0.6.0/rewrite-clj-0.6.0.pom from clojars
Retrieving rewrite-cljs/rewrite-cljs/0.4.4/rewrite-cljs-0.4.4.pom from clojars
Retrieving org/clojure/tools.trace/0.7.10/tools.trace-0.7.10.pom from central
Retrieving org/tcrawley/dynapath/0.2.5/dynapath-0.2.5.jar from central
Retrieving org/clojure/core.rrb-vector/0.0.13/core.rrb-vector-0.0.13.jar from central
Retrieving com/googlecode/java-diff-utils/diffutils/1.3.0/diffutils-1.3.0.jar from central
Retrieving org/clojure/tools.cli/0.3.7/tools.cli-0.3.7.jar from central
Retrieving org/clojure/java.classpath/0.3.0/java.classpath-0.3.0.jar from central
Retrieving org/clojure/tools.reader/1.2.2/tools.reader-1.2.2.jar from central
Retrieving org/clojure/tools.namespace/0.3.0-alpha4/tools.namespace-0.3.0-alpha4.jar from central
Retrieving org/clojure/tools.trace/0.7.10/tools.trace-0.7.10.jar from central
Retrieving cider/cider-nrepl/0.20.0/cider-nrepl-0.20.0.jar from clojars
Retrieving thunknyc/profile/0.5.2/profile-0.5.2.jar from clojars
Retrieving cider/piggieback/0.3.10/piggieback-0.3.10.jar from clojars
Retrieving cider/orchard/0.4.0/orchard-0.4.0.jar from clojars
Retrieving iced-nrepl/iced-nrepl/0.4.1/iced-nrepl-0.4.1.jar from clojars
Retrieving mvxcvi/puget/1.0.2/puget-1.0.2.jar from clojars
Retrieving mvxcvi/arrangement/1.1.1/arrangement-1.1.1.jar from clojars
Retrieving fipp/fipp/0.6.14/fipp-0.6.14.jar from clojars
Retrieving compliment/compliment/0.3.8/compliment-0.3.8.jar from clojars
Retrieving cljs-tooling/cljs-tooling/0.3.1/cljs-tooling-0.3.1.jar from clojars
Retrieving cljfmt/cljfmt/0.6.1/cljfmt-0.6.1.jar from clojars
Retrieving rewrite-clj/rewrite-clj/0.6.0/rewrite-clj-0.6.0.jar from clojars
Retrieving rewrite-cljs/rewrite-cljs/0.4.4/rewrite-cljs-0.4.4.jar from clojars
Retrieving nrepl/nrepl/0.5.3/nrepl-0.5.3.jar from clojars
Retrieving nrepl/bencode/1.0.0/bencode-1.0.0.jar from clojars
Retrieving refactor-nrepl/refactor-nrepl/2.4.0/refactor-nrepl-2.4.0.jar from clojars
[WARNING] No nREPL middleware descriptor in metadata of #'cider.piggieback/wrap-cljs-repl, see nrepl.middleware/set-descriptor!
[WARNING] No nREPL middleware descriptor in metadata of #'cider.piggieback/wrap-cljs-repl, see nrepl.middleware/set-descriptor!
[WARNING] No nREPL middleware descriptor in metadata of #'cider.piggieback/wrap-cljs-repl, see nrepl.middleware/set-descriptor!
[WARNING] No nREPL middleware descriptor in metadata of #'cider.piggieback/wrap-cljs-repl, see nrepl.middleware/set-descriptor!
[WARNING] No nREPL middleware descriptor in metadata of #'cider.piggieback/wrap-cljs-repl, see nrepl.middleware/set-descriptor!
[WARNING] No nREPL middleware descriptor in metadata of #'cider.piggieback/wrap-cljs-repl, see nrepl.middleware/set-descriptor!
[WARNING] No nREPL middleware descriptor in metadata of #'cider.piggieback/wrap-cljs-repl, see nrepl.middleware/set-descriptor!
[WARNING] No nREPL middleware descriptor in metadata of #'cider.piggieback/wrap-cljs-repl, see nrepl.middleware/set-descriptor!
[WARNING] No nREPL middleware descriptor in metadata of #'cider.piggieback/wrap-cljs-repl, see nrepl.middleware/set-descriptor!
[WARNING] No nREPL middleware descriptor in metadata of #'cider.piggieback/wrap-cljs-repl, see nrepl.middleware/set-descriptor!
Exception in thread "main" java.lang.RuntimeException: Unable to resolve var: cider.nrepl/wrap-pprint in this context, compiling:(/tmp/form-init8693096450787375708.clj:1:12169)
	at clojure.lang.Compiler.analyzeSeq(Compiler.java:7010)
	at clojure.lang.Compiler.analyze(Compiler.java:6773)
	at clojure.lang.Compiler.analyze(Compiler.java:6729)
	at clojure.lang.Compiler$InvokeExpr.parse(Compiler.java:3881)
	at clojure.lang.Compiler.analyzeSeq(Compiler.java:7005)
	at clojure.lang.Compiler.analyze(Compiler.java:6773)
	at clojure.lang.Compiler.analyze(Compiler.java:6729)
	at clojure.lang.Compiler$InvokeExpr.parse(Compiler.java:3881)
	at clojure.lang.Compiler.analyzeSeq(Compiler.java:7005)
	at clojure.lang.Compiler.analyze(Compiler.java:6773)
	at clojure.lang.Compiler.access$300(Compiler.java:38)
	at clojure.lang.Compiler$LetExpr$Parser.parse(Compiler.java:6368)
	at clojure.lang.Compiler.analyzeSeq(Compiler.java:7003)
	at clojure.lang.Compiler.analyze(Compiler.java:6773)
	at clojure.lang.Compiler.analyze(Compiler.java:6729)
	at clojure.lang.Compiler$BodyExpr$Parser.parse(Compiler.java:6100)
	at clojure.lang.Compiler$FnMethod.parse(Compiler.java:5460)
	at clojure.lang.Compiler$FnExpr.parse(Compiler.java:4022)
	at clojure.lang.Compiler.analyzeSeq(Compiler.java:7001)
	at clojure.lang.Compiler.analyze(Compiler.java:6773)
	at clojure.lang.Compiler.eval(Compiler.java:7059)
	at clojure.lang.Compiler.eval(Compiler.java:7052)
	at clojure.lang.Compiler.eval(Compiler.java:7052)
	at clojure.lang.Compiler.load(Compiler.java:7514)
	at clojure.lang.Compiler.loadFile(Compiler.java:7452)
	at clojure.main$load_script.invokeStatic(main.clj:278)
	at clojure.main$init_opt.invokeStatic(main.clj:280)
	at clojure.main$init_opt.invoke(main.clj:280)
	at clojure.main$initialize.invokeStatic(main.clj:311)
	at clojure.main$null_opt.invokeStatic(main.clj:345)
	at clojure.main$null_opt.invoke(main.clj:342)
	at clojure.main$main.invokeStatic(main.clj:424)
	at clojure.main$main.doInvoke(main.clj:387)
	at clojure.lang.RestFn.applyTo(RestFn.java:137)
	at clojure.lang.Var.applyTo(Var.java:702)
	at clojure.main.main(main.java:37)
Caused by: java.lang.RuntimeException: Unable to resolve var: cider.nrepl/wrap-pprint in this context
	at clojure.lang.Util.runtimeException(Util.java:221)
	at clojure.lang.Compiler$TheVarExpr$Parser.parse(Compiler.java:720)
	at clojure.lang.Compiler.analyzeSeq(Compiler.java:7003)
	... 35 more
REPL server launch timed out.

Split stdout window vertically

Hi, can't seem to get the stdout window feature (ss) to ever split vertically instead of horizontally. Have tried several ways to make this default behavior but have failed. Can get my normal splits to default to vertical but not the vim-iced-stdout-buffer.

Admittedly, I'm a vim noob and have been working in Emacs for years so if anyone can point me in the right direction I would really appreciate it!

Using neovim 0.3.5

Thanks!!

Steps to work with shadow-cljs

Hi, first of all, thanks for creating vim-iced, it's a fantastic plugin.

I just want to document my experience getting it set up and working with shadow-cljs, because it wasn't very straightforward, and this post might help other people in the future.

The following incantation worked for my project:

  1. :IcedConnect
  2. :IcedEvalRepl (shadow/repl {build-id})
  3. :IcedEval and :IcedEvalVisual (not :IcedEvalRepl :IcedEvalReplVisual)

There were a couple of stumbling blocks I encountered when getting this to work.

  1. Using :IcedStartCljsRepl shadow-cljs {build-id} did not work for me.
  2. Not knowing the difference between :IcedEval and :IcedEvalRepl and when to use each.
    • E.g. At first I tried to eval project-specific code using :IcedEvalRepl, which didn't work.

I would be happy to look more into the :IcedStartCljsRepl issue and possible open a PR.

Tab-local scoped iced REPL connection

I'd like to have multiple REPLs and projects open inside a single vim instance, each in their own tab. Currently it appears the REPL connection is global.

Sometimes global is nice when I want a single REPL across projects, but other times I want each tab to have its own connection.

Shadow-cljs watch hangs when connected with vim-iced

liquidzใ•ใ‚“ใ€€ใ“ใ‚“ใซใกใฏ
ๆฎ‹ๅฟตใชใŒใ‚‰ใ‚‚ใ†ไธ€ใคshadow-cljsใซใคใ„ใฆๅ•้กŒใฏ่ฆ‹ใคใ‹ใ‚Šใพใ—ใŸใ€‚

Hi liquidz!
I'm sorry to say that I've found another bug related to shadow-cljs. The steps to reproduce are below:

  1. Clone minimal-shadow-cljs-browser
  2. Install/watch
yarn
(mkdir -p target && cp assets/index.html target/)
yarn shadow-cljs watch app
  1. Open browser to connect; localhost:8080
  2. Open src/main.cljs in vim
  3. Run :IcedStartCljsRepl shadow-cljs app
  4. Modify the file and save. E.g. add (def e 3)
  5. Evaluate a form. (Try evaluating (def e 3))
  6. Open src/lib.cljs
  7. Modify the file and save. E.g. change (def c 1) to (def c 10)
  8. Go back to src/main.cljs
  9. Modify the file and save. E.g. add (def f 4)
  10. Repeat 6. - 11. until the compiler hangs.
  11. Notice: the the shadow-cljs watch process hangs on Compiling ... or fails to compile at all.

Unfortunately I am not able to reproduce this 100% of the time, but modifying/saving/eval-ing back and forth between both files will eventually result in the compiler hanging.

Let me know if you need any more info!

ใ‚ใ‚ŠใŒใจใ†ใ”ใ–ใ„ใพใ™

Auto document popup window takes several seconds to appear

Thanks for pushing up this feature to the Dev branch to play around with!! Works great. Only issue is that it takes about 4 seconds for the popup to appear. I see there is the g:iced#popup#time setting for how long before closing (and I even tried toggling that in case it affected the opening behavior) but is there a value I can toggle to make the popup open faster? General neovim setting maybe?

On the video you posted yours opens up much faster!! Thanks again!

....BTW, I don't have this issue when using popup windows on the debugger, those open up right away

Error detected while processing function iced#nrepl#auto#winenter

Sometimes I need to restart my repl. If I move my cursor to clojure files while I'm restarting my repl I sometimes get this obscure error:

image

Timed out.                                                                                                                                                                                                                                                                       
Error detected while processing function iced#nrepl#auto#winenter[7]..iced#nrepl#ns#in[1]..iced#nrepl#ns#name[6]..<SNR>224_ns_name_by_var:

Not sure if it's related but I almost always see an error when :IcedReconnecting after restarting my iced repl:

Timed out.                                                                                                                                                                                                                                                                       
Disconnected.                                                                                                                                                                                                                                                                    
Error detected while processing function iced#nrepl#reconnect[8]..iced#nrepl#connect[25]..339:                                                                                                                                                                                   
line    7: 
connection failed: connection refused  

If I run it again it usually succeeds almost immediately.

Auto indent for defrecord

| means cursor position

(defrecord foo []
  Foo
  (bar [this]
    (let [baz 1]|)))

expected

(defrecord foo []
  Foo
  (bar [this]
    (let [baz 1]
      |)))

actual

(defrecord foo []
  Foo
  (bar [this]
    (let [baz 1]
         |)))

How to use tracing?

I found IcedToggleTraceVar / IcedToggleTraceNs in the docs but I'm not sure how to use them. I turned on tracing for the current namespace then evaluated some functions but I'm not seeing any trace output. Where should I expect to see it?

Thanks!

Redrawing glitches when an exception is thrown

Details of my setup

  • Ubuntu 16.04
  • Neovim v0.3.2-dev
  • tmux v2.9

Steps to reproduce

  1. Start iced repl in another window.
  2. Connect to it via :IcedConnect.
  3. Evaluate a form that throws an exception, like (throw (ex-info "oops" {}))

Expected behavior

The exception message is displayed.

Actual behavior

The exception message is displayed, but the lines in the buffer also redraw strangely:

2018-12-13-152217_724x435_scrot

I'm able to get things back to normal by scrolling up and down the file; as my cursor enters each line, it redraws correctly.

Unable to resolve var: cider.piggieback/wrap-cljs-repl

I'm hitting this error on some of my projects (but not others). I haven't looked into it any further, but if I discover anything, I'll let you know. I worked around it locally by removing the piggieback plugin (https://github.com/matthias-margush/vim-iced/pull/1/files), since I don't need the plugin at the moment.

แƒป iced repl
OK: Leiningen project is detected
Warning: implicit hook found: lein-environ.plugin/hooks
Hooks are deprecated and will be removed in a future version.
Error loading cider.piggieback: java.lang.Exception: namespace 'cljs.closure' not found, compiling:(cljs/repl.cljc:9:1)
Exception in thread "main" java.lang.RuntimeException: Unable to resolve var: cider.piggieback/wrap-cljs-repl in this context, compiling:(/private/var/folders/bf/h482ks9x7n1_7_vd08v570vndt0j0_/T/form-init6580301070413941321.clj:1:5461)
        at clojure.lang.Compiler.analyzeSeq(Compiler.java:7010)
        at clojure.lang.Compiler.analyze(Compiler.java:6773)
        at clojure.lang.Compiler.analyze(Compiler.java:6729)
        at clojure.lang.Compiler$InvokeExpr.parse(Compiler.java:3881)
        at clojure.lang.Compiler.analyzeSeq(Compiler.java:7005)
        at clojure.lang.Compiler.analyze(Compiler.java:6773)
        at clojure.lang.Compiler.analyze(Compiler.java:6729)
        at clojure.lang.Compiler$InvokeExpr.parse(Compiler.java:3881)
        at clojure.lang.Compiler.analyzeSeq(Compiler.java:7005)
        at clojure.lang.Compiler.analyze(Compiler.java:6773)
        at clojure.lang.Compiler.access$300(Compiler.java:38)
        at clojure.lang.Compiler$LetExpr$Parser.parse(Compiler.java:6368)
        at clojure.lang.Compiler.analyzeSeq(Compiler.java:7003)
        at clojure.lang.Compiler.analyze(Compiler.java:6773)
        at clojure.lang.Compiler.analyze(Compiler.java:6729)
        at clojure.lang.Compiler$BodyExpr$Parser.parse(Compiler.java:6100)
        at clojure.lang.Compiler$FnMethod.parse(Compiler.java:5460)
        at clojure.lang.Compiler$FnExpr.parse(Compiler.java:4022)
        at clojure.lang.Compiler.analyzeSeq(Compiler.java:7001)
        at clojure.lang.Compiler.analyze(Compiler.java:6773)
        at clojure.lang.Compiler.eval(Compiler.java:7059)
        at clojure.lang.Compiler.eval(Compiler.java:7052)
        at clojure.lang.Compiler.eval(Compiler.java:7052)
        at clojure.lang.Compiler.load(Compiler.java:7514)
        at clojure.lang.Compiler.loadFile(Compiler.java:7452)
        at clojure.main$load_script.invokeStatic(main.clj:278)
        at clojure.main$init_opt.invokeStatic(main.clj:280)
        at clojure.main$init_opt.invoke(main.clj:280)
        at clojure.main$initialize.invokeStatic(main.clj:311)
        at clojure.main$null_opt.invokeStatic(main.clj:345)
        at clojure.main$null_opt.invoke(main.clj:342)
        at clojure.main$main.invokeStatic(main.clj:424)
        at clojure.main$main.doInvoke(main.clj:387)
        at clojure.lang.RestFn.applyTo(RestFn.java:137)
        at clojure.lang.Var.applyTo(Var.java:702)
        at clojure.main.main(main.java:37)
Caused by: java.lang.RuntimeException: Unable to resolve var: cider.piggieback/wrap-cljs-repl in this context
        at clojure.lang.Util.runtimeException(Util.java:221)
        at clojure.lang.Compiler$TheVarExpr$Parser.parse(Compiler.java:720)
        at clojure.lang.Compiler.analyzeSeq(Compiler.java:7003)
        ... 35 more
REPL server launch timed out.

How is skeleton intended to work?

Provides code skeleton when you open new file

I created a new .clj file and opened it while connected to iced. Messages shows:

|| Connected.
|| (ns ..) form is not found.

Do I need to activate it?

--with-clj option to force clojure cli when there is a projec.clj

Hi,

I'm evaluating the project. I'm favoring tools.dep for dependencies and avoiding lein as much as I can. The fulcro template (lein new fulcro app) creates project.clj but it's meant to be used just as a uberjar.
So I'm asking if you could create an option like --with-cljs but for tools-dep, this way the project.clj would be ignored and a n-repl server started (like when there is no project.clj and a deps.edn exists).

Regards,

Geraldo Lopes de Souza.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.