Module uvls::ide::completion

source ยท
Expand description

Handle Completion and code suggestions for IDEs

All things completion related happen in here, the process is roughly as follows:

  1. Find the current context using the latest draft and editor position
  2. Find good completions in this context

The completion context includes:

  • Meta information on the cursor position eg. Are we currently in a path or an empty line etc.
  • The semantic context eg. do we need a constraint or a number
  • A optional path prefix and suffix. The suffix is used as a weight for completions using the jaro winkler distance, the prefix is a filter restricting possible completions.

To weigh completions we use a simple weight function with hand picked weights for parameters like length or type correctness

Structsยง

Enumsยง

Staticsยง

Functionsยง