GithubHelp home page GithubHelp logo

clojure-emacs / cljs-tooling Goto Github PK

View Code? Open in Web Editor NEW
59.0 10.0 10.0 187 KB

[DEPRECATED] Tooling support for ClojureScript

Clojure 98.86% Emacs Lisp 0.36% Makefile 0.78%
clojurescript clojure completion tooling cider

cljs-tooling's People

Contributors

arichiardi avatar bbatsov avatar cichli avatar deraen avatar gtrak avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cljs-tooling's Issues

No info response should be nil instead of {}

The info op, for cljs, now returns {} when nothing is found. I think we should be consistent with the return value for the clojure info op, which returns nil. Using nil allows us to use when-let and friends to better effect.

Var info fails for vars of the same namespace in 0.3.0

Running into issues with 0.3.0 with navigating to a var's definition. To recreate, attempt to navigate to a var defined in the same namespace. Getting "user-error: Symbol ‘thing’ not resolved" and no-info back in the nrepl logs.

I built cider-nrepl and pointed cljs-tooling back at 0.2.0 (currently went through 0.3.0-snapshot and 0.3.0) and the navigation is restored.

I was gonna jump into this myself but I see that there was a lot of work around self-hosted so I was wondering if @arichiardi might point me in the right direction first.

clojurescript core things not resolved in other namespaces

If i'm in cljs.user, I can find information about vars in my namespace, but I can't find info about vars brought in from clojurescript core.

Ie,

(--> 
  op  "info"
  session  "846fed44-d63a-4dc1-b123-48f51d506853"
  ns  "cljc-bug.core"
  symbol  "def"
  id  "44"
)
(<-- 
  id  "44"
  session  "846fed44-d63a-4dc1-b123-48f51d506853"
  status  ("done" "no-info")
)

Ideally, I'd like for this to find the info. Raised in an issue on CIDER here issue 1358

cider-find-keyword fails with "Can't find namespace"

When a source file does't have a single def form, cljs-tooling.util.analysis/find-ns return value has {} for the key :defs. Since cider.nrepl.middleware.ns/ns-path checks this through cljs-tooling.info/info to find the source file path, cider utilities like cider-find-keyword fails with message "Can't find namespace".

Usually it should not be an issue. Just in the particular case of a re-frame project, it is common to have separate files for just the subscriptions and/or event registrations. They won't be having any def form otherwise. Looking up the event and subscription definitions is very helpful and easy with cider-find-keyword. However, due to lack of def forms, this doesn't work. Workaround is to just remember to add at least one def form (dummy).

It would be very convinient if the library can be enhanced to tackle this case and at least the :file be present instead of just the empty map {}.

Is this expected behavior?

Putting the caret at |:

(ns withering-spell.views
  (:require [re-frame.core :as re-frame]))

(defn main-panel []
  (let [name (re-frame/subscribe [:name])]
    (fn []
      [:div
       [:h1.lion "Headline"]
       [:ul
        (for [x (range 1 4)]
          [:li x])]
       [:div "Hi"]
       [:ul
        [:li "Cat is coming"]]
       [:button {:on-click #(re-frame/|)}]
       "I am your Death. Hello from " @name]
      )))

And pressing tab returns no completions. The ns form is loaded. Is this expected behavior? Default clojure.core things do auto-complete (like map).

Release a "stable" version

I want to push out cider-nrepl 0.6.0 (to be in sync with CIDER's own version), but I need a stable release of cljs-tooling to do so.

Cut new release

I'm hoping to release CIDER 0.9 soon, so a new cljs-tooling release would be handy.

Compliment-like features

In order to provide a similar experience for users of both Clojure and ClojureScript it'd be nice if the completion handling code supported several compliment features:

  • context aware completion
  • fuzzy completion

I guess those should be straightforward to port?

Combine completion candidates with metadata regarding them

Emacs has a feature that allows you to annotate a completion candidate with addition information - e.g. the type of the candidate (function, macro, interface, etc). You can see the feature in action for Emacs Lisp completions. For this to effectively used, however, it'd be beneficial if one could retrieve a completion candidate together with some metadata regarding it (perhaps the type and the ns/package of the candidate, maybe others make sense as well), so avoid having to do one of two things:

retrieve the metadata for each candidate individually (which is slow)
retrieve all candidates and then do a second function call to retrieve the metadata for all of them
Obviously this is not a must-have feature, but it'd be nice to have something like this in tools like CIDER. I'm also not quite sure if packages like compliment should handle this or their clients, but I wanted to start a discussion on the subject.

I've opened a similar issue for compliment (alexander-yakushev/compliment#16).

Move info to orchard

In order not only to solve clojure-emacs/cider#2523 but also to have more consistency between the Clojure and ClojureScript tooling world, I have started porting the cljs-tooling.info namespace to orchard.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.