-
-
Notifications
You must be signed in to change notification settings - Fork 45
add eldoc support #22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
I'd suggest killing the separate files and just putting everything in |
P.S. Capitalize the commit messages. |
Sure thing. I just kept the same structure for now so it's easier for me to find things in Cider. Currently trying to get it working for ClojureScript, which is a bit of a pain it seems. |
OK, take your time. We're definitely not in a hurry. |
I cleaned things up and added everything that was needed to Because of ClojureScript I haven't enabled eldoc mode in the REPL by default. You can run (inf-clojure-eldoc-setup)
(eldoc-mode +1) when the |
Guess you can add this info the README, so it'd be easier for users to find it. |
Sure thing. I'll add it. Or is there an easy way to find out if a cljs or clj REPL is running? |
Just noticed that I can always do the |
Only |
@@ -131,6 +134,10 @@ The following commands are available: | |||
|
|||
\\{inf-clojure-minor-mode-map}" | |||
:lighter "" :keymap inf-clojure-minor-mode-map | |||
(inf-clojure-eldoc-setup) | |||
;; No ElDoc support for ClojureScript yet | |||
(unless (equal major-mode 'clojurescript-mode) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's generally better to use derived-mode-p
, as it will work with derived modes as well.
Btw, I now remembered we don't turn on Btw, I'm guessing the eldoc-code could check that's in a Clojure REPL, so that's it's safe to have it turned on in a ClojureScript REPL. Apart from those remarks, everything looks good. |
Ok, no problem. I'll change it to off by default then. Been thinking about doing the check in the eldoc-code but not sure what the best, and performant, way is to check if it's a Clojure REPL. |
Guess you can simply check about the existence of some cljs ns or dynamic var. That should be quite fast. |
Updated the PR:
In ClojureScript the debug message was still showing before, this made it annoying. |
Apart from my small remarks, things are looking good. We're pretty close to merging this. |
Sorry about the |
Already removed it. |
Did you have any other remarks besides Btw, what is your regular workflow with PR's? Do I need to force push or fix things in new commits? |
They were about the text in the README. Guess you can see the email notification or check github's notifications centre.
I also address comments by force-pushing. Doing new commits is fine as well, as long as they get properly squashed before being merged in the end. |
Ok, thanks for the info. Updated the README. |
This probably needs some cleaning up and maybe some changes.
Would be really nice if you could take a look.
I started out with the code from cider and changed things where needed. Haven't hit any performance issues so far. Eldoc works in clojure buffer and repl.