Crate dotrain_lsp

Source
Expand description

The Rain language server protocol (LSP) implementation (language services) written in rust and made available for NodeJs and broswers through wasm-bindgen in Typescript/Javascript which makes it well suited for editors and IDEs (as it is used in Rainlang vscode and codemirror language extension). This includes all LSP (language services) related implementation that provide methods and functionalities for getting language server protocol based services for given text document and/or RainDocument

Re-exports§

pub use dotrain;
pub use lsp_types;

Modules§

js_api

Structs§

LanguageServiceParams
Parameters for initiating Language Services
RainLanguageServices
Provides methods for getting language services (such as diagnostics, completion, etc) for a given TextDocumentItem or a RainDocument. Each instance is linked to a shared locked Store instance Arc<RwLock<Store>> that holds all the required metadata/functionalities that are required during parsing a text.

Traits§

OffsetAt
Trait for converting lsp position to offset (implemented for &str and String)
PositionAt
Trait for converting offset to lsp position (implemented for &str and String)

Functions§

get_completion
Provides completion items for the given RainDocument at the given Position
get_diagnostics
Provides diagnostics for the given RainDocument by converting all problems to LSP diagnostics
get_hover
Provides hover item for the given RainDocument at the given Position
get_semantic_token
Provides semantic tokens for RainDocument’s elided fragments token_modifiers bit are set with provided token_modifiers_len ((2 ^ len) - 1) such as a length of 3 equals to 00000111