0.6.0
Smarter code completions and more
This release finally brings some new shiny features.
Code completions use information from ns
forms
Thanks to this information we can offer namespace aliases and referred symbols in code completions for current namespace (see #21).
ns
forms also give us some partial information about macro namespaces and their symbols.
When you mention a macro namespace by :require-macros
or similar Dirac can learn about it.
And additionally when you :refer
some macro symbols in a ns
form Dirac again can learn about their existence. Of course Dirac cannot learn about all macro namespaces and all their symbols this way, you have to mention them in some ns
form if you want to see them in code completions. It think this is good enough solution.
Completions also newly offer special REPL command like in-ns
, require
and similar. And also dirac!
command is supported.
Please note that all code-completion information is obtained on client-side (from files available in the browser). By design we don't want Dirac to talk to nREPL and rely on some "connection" to provide some kind of server-side code completions. Dirac code completions should work without Dirac Agent (with no REPL enabled). Instead Dirac relies on source maps to obtain all available symbols for given namespace. It also relies on :optimizations :none
behaviour of ClojureScript compiler and Google Closure module system to obtain all namespaces in the project and reads original .cljs sources to parse ns
forms to learn additional information.
Beautification of function names and clean URLs
Dirac now tries to be smart about printing function names which were generated by ClojureScript. It tries to demunge them and strip namespaces for brevity. Fully qualified names are still available as tooltips on mouse hover. Compare the screenshots of the "Call Stack" sidebar pane below.
Also you could notice that Dirac does not display URL parameters directly in the UI anymore. The main motivation for this was Figwheel's behaviour which adds cache busting parameters everywhere and that cluttered the DevTools UI.
DevTools
Embedded DevTools merged b71deea...f67efab which should work best with Chrome ~ 53.0.2756.0. (note that Canary 53.0.2759.0 is pretty much broken on Mac).
Notable commits
84501e1 devtools: introduce :clean-urls feature
5c84b7a devtools: introduce :beautify-function-names feature
4421519 implant: add UI scraping subsystem via :scrape automation action
8f3560c devtools: prevent paralel invocation of worker in extractNamespacesAsync
71601b9 implant: add support for parsing namespace aliases/uses
e2c04b3 devtools: use stable sort when sorting completion suggestions
08b2690 implant: support detectedMacroNamespaces from parsed ns forms
bcc95d4 devtools: improve code completions
d1bf84a devtools: fix prefix highlighting in suggest boxes in all cases
123940e devtools: include repl specials into code completion
All new work: 6d49ff2...38e5599.