Module typing

Module typing 

Source
Expand description

This module handles auto-magic editing actions applied together with users edits. For example, if the user typed

    foo
        .bar()
        .baz()
    |   // <- cursor is here

and types . next, we want to indent the dot.

Language server executes such typing assists synchronously. That is, they block user’s typing and should be pretty fast for this reason!

ModulesΒ§

on_enter πŸ”’
Handles the Enter key press. At the momently, this only continues comments, but should handle indent some time in the future as well.

StructsΒ§

ExtendedTextEdit πŸ”’

ConstantsΒ§

TRIGGER_CHARS πŸ”’

FunctionsΒ§

conv πŸ”’
on_char_typed πŸ”’
on_char_typed_ πŸ”’
on_delimited_node_typed πŸ”’
on_dot_typed πŸ”’
Returns an edit which should be applied when a dot (β€˜.’) is typed on a blank line, indenting the line appropriately.
on_eq_typed πŸ”’
Returns an edit which should be applied after = was typed. Primarily, this works when adding let =.
on_left_angle_typed πŸ”’
Add closing > for generic arguments/parameters.
on_left_brace_typed πŸ”’
on_opening_delimiter_typed πŸ”’
Inserts a closing delimiter when the user types an opening bracket, wrapping an existing expression in a block, or a part of a use item (for {).
on_pipe_typed πŸ”’
on_plus_typed πŸ”’
on_right_angle_typed πŸ”’
Adds a space after an arrow when fn foo() { ... } is turned into fn foo() -> { ... }