Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[improvement] better auto-complete / suggestions #60

Open
10 tasks
azjezz opened this issue Jun 16, 2019 · 2 comments
Open
10 tasks

[improvement] better auto-complete / suggestions #60

azjezz opened this issue Jun 16, 2019 · 2 comments

Comments

@azjezz
Copy link
Contributor

azjezz commented Jun 16, 2019

  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.

@tspence
Copy link
Contributor

tspence commented Oct 24, 2019

We've done a number of improvements on autocomplete since June. The open source build should now use the new sqlite based autocomplete and should give good results for these use cases.

May I ask you whether the latest build has addressed some or all of these issues?

@azjezz
Copy link
Contributor Author

azjezz commented Nov 2, 2019

autocomplete symbols from all namespaces, while suggesting the nearest symbols fist.

autocompletion works only with current namespace, and child namespaces ( not grand childs, or parent namespace )

suggestions are not ordered.

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.

classnames/classish symbols : supported only from the current namespace, and child namespaces ( not grand childs, or parent namespace )
built-in types : no supported
type aliases : no supported
type definitions : no supported

suggestions are not ordered.

autocomplete implements | / require implements | with interfaces from all namespaces, while suggesting the nearest symbols fist.

autocompletion works only with current namespace, and child namespaces ( not grand childs, or parent namespace )

suggestions are not ordered.

autocomplete uses | with traitnames from all namespaces, while suggesting the nearest symbols fist.

autocompletion works only with current namespace, and child namespaces ( not grand childs, or parent namespace )

suggestions are not ordered.

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.

autocompletion works only with current namespace, and child namespaces ( not grand childs, or parent namespace )

builtin types are not supported.
suggestions are not ordered.

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. )

not supported

suggest only variables with same type as right expression when dealing with strict compression ( e.g : $string === $| )

not supported

only suggest variables of type bool when dealing with boolean operators ( e.g $a || $| )

not supported

only suggest variables of type num when dealing with mathematical operators ( e.g $a + $| )

not supported

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants