Skip to content

Unintuitive behaviour of cider-connect-sibling  #3012

Closed
@yuhan0

Description

@yuhan0

Expected behavior

When I'm in a cljs buffer in a project with only a clj repl, I expect to be able to M-x cider-connect-sibling-cljs to start up a clojurescript repl within the same session.
Mental model: "Connect this buffer to existing ones"

Actual behavior

An error message is produced

No cljs REPLs in current session "..."

It seems that I have to navigate to a clj file in order to execute cider-connect-sibling-cljs, which seems quite unintuitive.
Mental model: "Connect other repl to this live buffer"

The reverse situation is also true - with a cljs repl in the session, I cannot cider-connect-sibling-clj from a clj file

Steps to reproduce the problem

src/
  foo.clj
  bar.cljs
  • Navigate to bar.cljs
    M-x cider-connect-clj
    M-x cider-connect-sibling-cljs

  • Error message is produced.

  • Navigate to foo.clj, or M-x clojure-mode to trick Cider to thinking we're in a clj file.
    M-x cider-connect-sibling-cljs

  • cljs repl is successfully connected

Environment & Version information

CIDER version information

;; CIDER 1.1.0 (Plovdiv), nREPL 0.7.0
;; Clojure 1.10.1, Java 13.0.2

Emacs version

28.0.50

Operating system

macOS 11.2.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions