Feature: New Python completions
Feature: New Ruby completions
Feature: New PHP completions
Feature: Documentation popovers
Note: Just read the damn blog post - http://chocolatapp.com/blog/one-five
Good god, an update. I know, right? You thought Chocolat had gone the way of TM2? I don't blame you. It's been months since the last update.
We’ve had every delay imaginable, and what should've been a 1 month turnaround turned into 4 months.
But we’re back, and boy do we have an update for you.
1.5 focuses on code completion. One of Chocolat's most beloved features is its handy HTML and CSS code completion. But not everybody is a web developer. We want awesome code completion in ALL the languages.
Unfortunately, it's not that easy (or the update would've been out months ago!). The reason our HTML code completion is so good is because it knows HTML. It knows which attributes go with which tags, which attributes can have values, which tags are most popular in real world code, which syntax to look out for so that it can show the code completion menu at exactly the right time.
To make awesome code completion, you need awesome special casing for each individual language. And that takes time.
Fortunately, I've had four months.
Python has the best support of the update, due to a mix of excellent language design and favouritism on my part.
Chocolat understands Python
Now when I go to use models, Chocolat knows what's inside.
Chocolat, obviously, knows about the whole Python standard library.
But wait there's more.
I spend most of my days zipping between Chocolat and looking up API documentation in the browser. It's such a huge waste of time. It's so easy to get distracted by something online: before you know it you're reading about sea urchins on wikipedia, when you originally just wanted to look up the arguments of a function.
Documentation is a big problem, and I don't hope to solve it in one go. But Chocolat 1.5 now has documentation popovers. It'll show you the documentation for the current class/method/function/etc.
Ruby poses some of its own unique problems. For one, there’s no
import statements like in Python. You don’t even have to
require a library in order to use it.
Chocolat does know about modules
(note that Chocolat can detect when you're using rails, so it doesn't depend on
require 'activerecord' except in untitled files)
Chocolat also knows about methods, though due to Ruby's love of duck typing and frequent use of monkey patching, it's pretty hopeless to guess which methods a given object has. My plan is to add some more heuristics to push the more likely methods up to the top.
Of course, Ruby gets the documentation popovers love as well
Chocolat’s already had good code completion for PHP for some time.
I haven't (yet) got around to writing a library indexer for PHP. Sorry!
What we do have are some of those nice documentation popovers for PHP. Needle-haystack? Haystack-needle? Now you needn't guess.
Say hi on #chocolat on freenode.net if you’d like to muck in.
As I said at the start, it’s my mission to add good code completion for every language possible.
We are somewhat limited by the fact that
So any help is welcome.
I did consider making completions available to the Chocolat JS API. However, I wasn’t happy with the performance, so we’re going to be sticking to pure Objective-C.
I hope you like this update. Normal weekly updates will resume promptly.