clojure-emacs / clojure-emacs/cider

cider-clojuredocs and cider-clojuredocs-web with clojurescript

Open
#2,874 8 comments 0 reactions 0 assignees View on GitHub
cider-nrepl enhancement good first issue
Dominant language
Emacs Lisp
Stars
3.7k
Forks
651
Avg merge
11h 6m
Merged PRs (30d)
33

Description

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](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"

Contributor guide

Open the contributing guide

Research direction

Start in cider-clojuredocs.el and compare the cider-clojuredocs and cider-clojuredocs-web functions, especially their ClojureScript handling. Review the reported cljs.core/case URL behavior and the existing user-error check. Done means the two commands have an agreed, consistent behavior for ClojureScript lookups, verified with an appropriate test or manual lookup.

Written by the indexing model from the issue text.

Assessment

Tech stack
emacs-lisp
Domain
developer-experience, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.