Kotlin API docs now have an auto complete search box for quickly finding classes, functions and properties

You can now quickly navigate to classes, functions or properties in the API docs by just typing in the search box that appears top right of each page.

e.g. go to the API docs and typing these things to the Search box: these examples use _ to mean “space” so use the space bar not the _ character!

  • class_
    • shows list of classes
  • class_H
    • classes starting with H
  • fun_
    • shows list of functions
  • map
    • shows all functions containing map so matches flatMap(), map(), mapTo() etc
  • map(
    • finds map() functions and flatMap() functions
  • _map(
    • finds just map() functions
  • fun_map
    • finds all functions starting with map


See what you think, would love feedback on making this neater; are there any queries you’d like to do but can’t?

One limitation right now on the underlying widget (jquery ui autocomplete) is that terms separated by spaces are treated as a single search string and its not case sensitive; so you can’t use “Map” to not match “map”, or “map Coll” to find the map() functions on Collection for example. We’d probably have to hack the jquery widget or try another one or something.

If this doesn’t work for you BTW, it could be your browser caching things; try flushing your cache, or at least hitting reload. The search data is here which if you load that and hit reload will force your browser to use the lastest data. If you only see a list of classes, then you’re browser’s caching.

Autocomplete is just GREAT! Thanks, James

Hey James,

Looks awesome! class only seems to autocomplete on three classes right now, is this intentional?


Cédric

Yeah, there's only about 3 public classes in the standard library :) (that are not internal implementation classes such as in kotlin.support). Most things are either functions or extension functions such as main kotlin package.

Unfortunately there’s still quite a few runtime classes in the jet package (unforuntely) which don’t get documented for things like Function1, Function2 etc as they are currently written in Java and kdoc can’t yet grok java code.

Here’s the apidoc for a separate library I’m working on; but again it seems mostly things tend to be functions (or extension functions) with internal private classes to implement them; so there’s not many public classes to complete on.