Skip to content
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

Add additional types for eldoc #99

Open
bbatsov opened this issue Aug 14, 2020 · 4 comments
Open

Add additional types for eldoc #99

bbatsov opened this issue Aug 14, 2020 · 4 comments
Labels
enhancement Improvement to an existing feature good first issue Good for newcomers

Comments

@bbatsov
Copy link
Member

bbatsov commented Aug 14, 2020

Currently the eldoc type is either function or variable:

(defn- extract-eldoc
  [info]
  (if-let [arglists (seq (-> info extract-arglists format-arglists))]
    {:eldoc arglists :type "function"}
    {:type "variable"}))

This means that the result users see is not particularly accurate, not to mention that the function check is pretty primitive. We should add types like macro, special-form, etc.

@bbatsov bbatsov added enhancement Improvement to an existing feature good first issue Good for newcomers labels Aug 14, 2020
@vemv
Copy link
Member

vemv commented Jan 9, 2022

Is eldoc fine with adding new types?

I couldn't add a reference to e.g. a 'macro' type in eldoc.el. I could find this:

(defvar eldoc-last-data (make-vector 3 nil)
  0 - ....
  1 - ...
  2 - `function' if function args, `variable' if variable documentation.")

@bbatsov
Copy link
Member Author

bbatsov commented Jan 10, 2022

No idea. We have to ask on the mailing list at some point.

@vemv
Copy link
Member

vemv commented Jun 23, 2023

#166 appears to have implemented this task.

@vemv
Copy link
Member

vemv commented Jun 23, 2023

...well, we would have to add method and var to match this expectation https://github.com/clojure-emacs/cider/blob/599e60d5f8a27697dfbcfe09e7adfcc12b5b0f43/cider-eldoc.el#L327-L331

Do we want so? It's cheap, let's simply make sure that we're solving a concrete problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improvement to an existing feature good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants