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
- Dotrain lsp services are used for vscode and codemirror, see rainlang-vscode and rainlang-codemirror repositories for more details.
- Dotrain vscode extension can be found here.
Re-exports§
Modules§
Structs§
- Language
Service Params - Parameters for initiating Language Services
- Rain
Language Services - 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§
- Offset
At - Trait for converting lsp position to offset (implemented for
&strandString) - Position
At - Trait for converting offset to lsp position (implemented for
&strandString)
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