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

Complete local bindings for ClojureScript files #767

Merged
merged 1 commit into from
Jan 31, 2023

Commits on Jan 31, 2023

  1. Complete local bindings for ClojureScript files

    When editing a ClojureScript file, cider-nrepl doesn't offer any local
    binding names (the function name and argument names if inside the
    function, the let-like block bindings if inside a let-like block,
    etc.) as completion candidates, like it does when editing a Clojure
    file.
    
    The root of the problem is that
    `cider.nrepl.middleware.complete/cljs-sources` only includes
    `::suitable-sources/cljs-source` as a possible source. And `suitable`
    doesn't perform any local binding analysis.
    
    Given that the local binding analysis done in
    `compliment.sources.local-bindings` namespace doesn't perform any
    evaluation or execution of the context form (thus, it is independent
    of the actual host platform differences), we can use that same source
    for ClojureScript local bindings completion.
    
    [Closes: clojure-emacs#766]
    iarenaza committed Jan 31, 2023
    Configuration menu
    Copy the full SHA
    86843f8 View commit details
    Browse the repository at this point in the history