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

Also offer completions for (var-) quoted symbols #82

Merged
merged 2 commits into from
Jun 17, 2022

Conversation

vemv
Copy link
Contributor

@vemv vemv commented Mar 7, 2022

Hi Alex,

it seemed to me that completions could be offered for quoted or var-quoted symbols.

Examples included as deftests.

The proposed solution is not particularly fancy, it might not be even be located in the best place but it might be at least a good conversation starter!

Build is green in my account:

image

Best wishes 🇺🇦

@@ -22,7 +28,19 @@
(strip-tags (core/completions "compliment.core/co"))
=> (just ["compliment.core/completions"])

(strip-tags (core/completions "'compliment.core/co"))
=> (just ["compliment.core/completions"])
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hmm, from real-world usage (in cider + company-mode local installations), it seems that the actual completion should also include the prefix, else company-mode will not offer the completion.

Which makes sense: for #'x/, returning [x/a, x/b] would mean that the #' prefix is lost, which is not what one means.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed in the second commit.

It's working beautifully!

Screen Shot 2022-03-07 at 6 13 50 AM

@bbatsov
Copy link
Collaborator

bbatsov commented Jun 17, 2022

@vemv Looks good to me. Please mention it in the changelog and we're good to go.

@bbatsov bbatsov merged commit ac1fb2e into alexander-yakushev:master Jun 17, 2022
@bbatsov
Copy link
Collaborator

bbatsov commented Jun 17, 2022

Actually I'll add the entry myself. Saves me dealing with merge conflicts there, now that there a few PRs to merge.

bbatsov added a commit that referenced this pull request Jun 17, 2022
@vemv vemv deleted the var-completions branch June 22, 2023 05:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants