Skip to content

[improvement] better auto-complete / suggestions #60

@azjezz

Description

@azjezz
  1. autocomplete symbols from all namespaces, while suggesting the nearest symbols fist.
  2. autocomplete method/function parameter type with classnames, builtin types, type aliases, type definitions, and other "classish" symbols from all namespaces, while suggesting the nearest symbols fist.
  3. autocomplete extends | / require extends | with classes / abstract classes ( no final classes should be suggested ) from all namespaces, while suggesting the nearest symbols fist.
  4. autocomplete implements | / require implements | with interfaces from all namespaces, while suggesting the nearest symbols fist.
  5. autocomplete uses | with traitnames from all namespaces, while suggesting the nearest symbols fist.
  6. autocomplete type definition ( e.g : type foo = | ) with builtin types, classish symbols, type definitions from all namespaces, while suggesting the builtin types first, followed by the nearest symbols.
  7. autocomplete variables ( e.g foo($| ) with variables form the current scoop first, followed by variables from the parent scoop if applicable ( e.g : inside a block, that being an async block or lambda body. while inside concurrent block, local scoop variables should not be suggested. )
  8. suggest only variables with same type as right expression when dealing with strict compression ( e.g : $string === $| )
  9. only suggest variables of type bool when dealing with boolean operators ( e.g $a || $| )
  10. only suggest variables of type num when dealing with mathematical operators ( e.g $a + $| )

Some of the features request above work perfectly when working on the global namespace, but as soon as namespaces are involved, the DX is not as pleasant.

note : | in the given samples refers to the cursor position.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions