Helpers in the code editor

Some improvements that would help a lot while editing cells code:

  • recognize when a function from an imported library is correctly written, and highlight it like it’s currently done for keywords and notebook variables (for example with the same dark blue color): e.g. highlight d3.geoAlbersUsa
  • when typing, propose autocomplete: d3.geoAlbe -> d3.geoAlbersUsa
  • link to the documentation, e.g. d3.geoAlbersUsa -> (I don’t know how to include this nicely in the current interface)

take a look at New Feature: Code Completion (Shipped!) for code completion. Does this cover your use case?

The link to documentation is an interesting idea, but finding the documentation for a required / imported library wouldn’t be trivial.

1 Like

Autocomplete for properties on imported (required) libraries should work already if you hit Tab, as shown here:

Syntax highlighting for object properties is an interesting idea. I think it might be tricky since objects can be dynamic, though, so we’d need to recompute syntax highlighting whenever referenced values change. (In contrast, autocomplete does an instantaneous sample of the defined properties when you hit Tab.)

I’d love integrated documentation. Tom commented on that here: