Skip to content

cider-clojuredocs and cider-clojuredocs-web with clojurescript #2874

Open
@mathvdh

Description

@mathvdh

Hi,

When I try to use cider-clojuredocs from clojurescript codes it says : ‘cider-clojuredocs’ doesn’t support ClojureScript
But when I try to use cider-clojuredocs-web from clojurescript it does open a browser window but with a wrong url, for example if I lookup "case", it goes to https://clojuredocs.org/cljs.core/case which is obviously wrong.

Because there is no equivalent of clojuredocs for clojurescript, I think the correct behaviour should be that it opens the corresponding clojuredocs documentation (even if clojurescript).

After checking a bit the code of cider-clojuredocs.el I have found that the lines

(when (derived-mode-p 'clojurescript-mode)
    (user-error "`cider-clojuredocs' doesn't support ClojureScript"))

Are present in (defun cider-clojuredocs [..] but not in (defun cider-clojuredocs-web [..] so

Either we have to have a similare behaviour for both which is generating a "user-error" ..

Or we remove this check and try to translate "cljs.core" to "clojure.core" (for example) in the urls and let it work for clojurescript ?

I would be motivated to work on this but I'd like to know what you guys think the correct behaviour should be.

Environment & Version information

CIDER version information

CIDER 0.25.0snapshot nREPL 0.7.0

Emacs version

27.0.91

Operating system

OS X 10.14.6 "Mojave"

Metadata

Metadata

Assignees

No one assigned

    Labels

    cider-nreplThe issue is related to cider-nreplenhancementgood first issueA simple tasks suitable for first-time contributors

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions