Implement auto-completion support for type fields

fixes #7401