Skip to main content

Module utils

Module utils 

Source

Enums§

PositionEncoding
How the LSP client counts column offsets within a line.

Functions§

byte_offset_to_position
Convert a byte offset in source to a Position whose column unit depends on the negotiated PositionEncoding.
encoding
Read the negotiated encoding (falls back to UTF-16 if never set).
is_valid_solidity_identifier
Check whether name is a valid Solidity identifier
position_to_byte_offset
Convert an LSP Position position back to a byte offset, where character is interpreted according to the negotiated PositionEncoding.
set_encoding
Store the negotiated encoding. Called exactly once from the LSP initialize handler. Subsequent calls are silently ignored.