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

Parameter Info - further tweaks to improve #70

Closed
gered opened this issue Oct 28, 2013 · 6 comments
Closed

Parameter Info - further tweaks to improve #70

gered opened this issue Oct 28, 2013 · 6 comments
Milestone

Comments

@gered
Copy link

gered commented Oct 28, 2013

Looking great so far, very helpful! But, I think with a few further tweaks it can be made even better. :)

  • It would be nice if it automatically popped up as soon as the user presses space after the entire function/form name is typed out.

e.g. If I type:

(println 
        -^

Once my cursor is at the point indicated, then you could automatically pop up the relevant Parameter Info tooltip. This mirrors the way that IntelliJ handles parameter info in Java code (or at least it is for me, dunno if that's some setting I enabled and forgot about! either way, I like it)

  • Could the parameter info tooltip also include the function/form name that the parameter info is for? This would be helpful moreso when you're going over existing code and place the cursor inside the middle of a bigger expression say and activate the parameter info tooltip where having that immediate visual feedback that you are looking at the parameter info you expect (and didn't maybe misclick on the wrong spot in your code) would be helpful. Again, this mirrors the way IntelliJ handles parameter info tooltips in Java code.

image

image

@cursive-ide
Copy link
Owner

Hmm, I don't get the automatic popup in Java code, that must be a configuration setting. I'll investigate.

Adding the form name should be straightforward, I'll do that. What is unfortunately basically impossible is highlighting the current parameter (like Java does) - Clojure's free-form parameter specs don't provide enough information.

@gered
Copy link
Author

gered commented Oct 28, 2013

Ah, yeah I see now, it's a setting: Editor -> Code Completion -> "Autopopup in (ms)" which is near the bottom. Perhaps Cursive could just hook into that setting then?

@cursive-ide
Copy link
Owner

Ah, I see - I'll take a look at what's required to obey that.

@cursive-ide
Copy link
Owner

Ok, these are both fixed in the new build. It's a little difficult to detect in Clojure when someone might want the auto-popup, so currently it's displayed when: the user autocompletes the first symbol in a list; the user autocompletes the second symbol in a list and the first one looks like it might be a method call; the user presses space after the first symbol in a list; the user presses space after the second symbol in a list as above. Feedback very welcome on whether this makes sense after using it for a bit.

@gered
Copy link
Author

gered commented Nov 8, 2013

Just wanted to provide a little bit of feedback here after using the auto-popup support for the last few days. It does feel pretty close to how it works in Java code. I haven't run into any issues yet where it didn't pop up when I expected it to, and it also does disappear appropriately when repeatedly pressing backspace to remove the first symbol, etc.

Overall I have no real complaints over how you implemented support for the option. It does have the same (occasional) tooltip positioning issues that you also see every now and then when working with Java code, so I think that's more of an IntelliJ issue and not so much a Cursive issue.

@cursive-ide
Copy link
Owner

Perfect, thanks for letting me know!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants