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

No completion for locals when hashset literal is used within short lambda syntax #118

Closed
rrudakov opened this issue Mar 5, 2024 · 5 comments
Labels

Comments

@rrudakov
Copy link
Contributor

rrudakov commented Mar 5, 2024

Steps to reproduce

Assume the following code:

(let [exclude-values ["one" "two"]
      my-var         (into []
                           (remove #(some #{(:value %)} exclude-values))
                           [{:value "one"}
                            {:value "two"}
                            {:value "three"}])]
  my-va__point__)

I expect my-var to be among completion candidates, but there are no candidates.

If I remove (remove #(some #{(:value %)} exclude-values)) everything works fine, so I guess this part causes the problem.

Relevant nREPL logs

(-->
  id                        "571"
  op                        "complete"
  session                   "183d8b71-0c93-4107-b623-a9227633cad5"
  time-stamp                "2024-03-05 14:57:02.727265000"
  context                   "(let [exclude-values [\"one\" \"two\"]
      my-var         (into []
                           (remove #(some #{(:value %)} exclude-values))
                           [{:value \"one\"}
                            {:value \"two\"}
                            {:value \"three\"}])]
  __prefix__)
"
  enhanced-cljs-completion? "t"
  ns                        #("app.scheduler.jobs.suggestions.blacklist-sites" 0 46 (face font-lock-type-face cider-block-dynamic-font-lock t cider-locals nil fontified t))
  prefix                    "my-va"
)
(<--
  id          "571"
  session     "183d8b71-0c93-4107-b623-a9227633cad5"
  time-stamp  "2024-03-05 14:57:02.737120000"
  completions nil
  status      ("done")
)
@alexander-yakushev alexander-yakushev changed the title No completion for locals with specific context No completion for locals when hashset literal is used within short lambda syntax Mar 7, 2024
@alexander-yakushev
Copy link
Owner

Pushed the fix for this in 0.5.2. @vemv, could you include it into the rolling cider-nrepl, please?

@vemv
Copy link
Contributor

vemv commented Mar 7, 2024

Sure!

Looks like the changelog needs a tweak btw (0.5.2 not visible)

@vemv
Copy link
Contributor

vemv commented Mar 10, 2024

(Done! https://github.com/clojure-emacs/cider/blob/c4fa1a84a3b3d03ef5f61cc5d33ff4e91b9a1dce/CHANGELOG.md?plain=1#L19-L22 )

@alexander-yakushev
Copy link
Owner

I can confirm that the issue is fixed in the latest CIDER, @rrudakov please check.

@rrudakov
Copy link
Contributor Author

rrudakov commented Mar 11, 2024 via email

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

No branches or pull requests

3 participants