Completion

object Completion
Companion:
class
trait Product
trait Mirror
class Object
trait Matchable
class Any

Type members

Classlikes

class Completer(val mode: Mode, val prefix: String, pos: SourcePosition)

Computes code completions depending on the context in which completion is requested

Computes code completions depending on the context in which completion is requested

Value parameters:
mode

Should complete names of terms, types or both

pos

Cursor position where completion was requested For the results of all xyzCompletions methods term names and type names are always treated as different keys in the same map and they never conflict with each other.

prefix

The prefix that all suggested completions should start with

final class Mode(val bits: Int) extends AnyVal

The completion mode: defines what kinds of symbols should be included in the completion results.

The completion mode: defines what kinds of symbols should be included in the completion results.

Companion:
object
object Mode
Companion:
class

Inherited types

The names of the product elements

The names of the product elements

Inherited from:
Mirror

The name of the type

The name of the type

Inherited from:
Mirror

Value members

Concrete methods

def backtickCompletions(completion: Completion, hasBackTick: Boolean): Completion

Inspect path to determine what kinds of symbols should be considered.

Inspect path to determine what kinds of symbols should be considered.

If the path starts with:

  • a RefTree, then accept symbols of the same kind as its name;
  • a renaming import, and the cursor is on the renamee, accept both terms and types;
  • an import, accept both terms and types;

Otherwise, provide no completion suggestion.

Inspect path to determine the offset where the completion result should be inserted.

Inspect path to determine the offset where the completion result should be inserted.

Inspect path to determine the completion prefix. Only symbols whose name start with the returned prefix should be considered.

Inspect path to determine the completion prefix. Only symbols whose name start with the returned prefix should be considered.

Get possible completions from tree at pos

Get possible completions from tree at pos

Returns:

offset and list of symbols for possible completions

Return the list of code completions with descriptions based on a mapping from names to the denotations they refer to. If several denotations share the same name, each denotation will be transformed into a separate completion item.

Return the list of code completions with descriptions based on a mapping from names to the denotations they refer to. If several denotations share the same name, each denotation will be transformed into a separate completion item.