New Issue: [Feature Request]: CLS: provide auto-complete suggestions for methods on types

24836, "DanilaFe", "[Feature Request]: CLS: provide auto-complete suggestions for methods on types", "2024-04-12T16:13:34Z"

This is a follow up to [Feature Request]: CLS: add global constants/functions to completion suggestions · Issue #24743 · chapel-lang/chapel · GitHub.

The original issue asked for global symbols, such as here and Locales.size. We have the first one, provided via #24776. The second one is much more difficult; quoting myself from comments in #24743:

The latter is a bit more challenging. Today, CLS works by looking at the saved version of the file, largely because the parser isn't very good at recognizing partial programs. If you write:

var x = Locales.

It doesn't know what to do with that program, so it's difficult to provide intelligent suggestions. So, code completion based on context, such as 'what's on the left of the .?', is a bit further off in the future.

To provide intelligent autocompletion, we likely need some sort of partial and incremental parser.