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

dynamic cljs completions with suitable #633

Merged
merged 1 commit into from
Aug 15, 2019
Merged

Conversation

rksm
Copy link
Member

@rksm rksm commented Aug 15, 2019

Before submitting a PR make sure the following things have been done:

  • The commits are consistent with our contribution guidelines
  • You've added tests to cover your change(s)
  • All tests are passing
  • The new code is not generating reflection warnings
  • You've updated the README (if adding/changing middleware)

Keep in mind that new cider-nrepl builds are automatically deployed to Clojars
once a PR is merged, but only if the CI build is green.

If you're just starting out to hack on cider-nrepl you might find
this article and the
"Design" section of the README extremely useful.

Thanks!

[msg cljs-env ns prefix extra-metadata]
(concat (cljs-complete/completions cljs-env prefix {:context-ns ns
:extra-metadata extra-metadata})
(suitable/complete-for-nrepl msg)))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why does suitable need the entire msg? I'm asking mostly because it seems to me that all the other params should be enough to get candidates.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It needs access to the cljs options + repl env + compiler env. We can pull those out and just pass them along but it seemed simpler to hand in the msg.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it. As this is something minor I guess there's no need to fret over it too much.

@bbatsov
Copy link
Member

bbatsov commented Aug 15, 2019

We should also mention this in the changelog, as it's certainly a noteworthy change.

README.md Outdated Show resolved Hide resolved
Copy link
Contributor

@arichiardi arichiardi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This patch looks great!

I would use another name though for the namespace. cljs-complete is/will be already included in compliment and suitable will be providing js-objects completions only.

I see one day all the functionalities being merged in compliment tbh...

@rksm
Copy link
Member Author

rksm commented Aug 15, 2019

I would use another name though for the namespace. cljs-complete is/will be already included in compliment and suitable will be providing js-objects completions only.

What exactly do you mean? suitable/complete-for-nrepl? Or the cljs-complete function name?

@bbatsov
Copy link
Member

bbatsov commented Aug 15, 2019

I guess he meant the cljs-complete, as we also have this as an ns alias right now. Maybe there's also such a function in compliment now, but I don't think we need to change the name as the prefix will be enough to tell them apart. Plus, we can always change this down the road.

@bbatsov bbatsov merged commit 3b6590d into clojure-emacs:master Aug 15, 2019
@arichiardi
Copy link
Contributor

Well yes you are right, I can actually change it with my integration PR or something

@arichiardi
Copy link
Contributor

I meant the function name but no probs, it can be tuned later on.

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

Successfully merging this pull request may close these issues.

4 participants