Crate html_languageservice

Source
Expand description

§HTMLLanguageService

The basics of an HTML language server.

HTMLLanguageService

§Examples

use html_languageservice::{HTMLDataManager, HTMLLanguageService, HTMLLanguageServiceOptions};
use lsp_textdocument::FullTextDocument;
use lsp_types::Position;

#[tokio::main]
async fn main() {
    // prepare
    let document = FullTextDocument::new("html".to_string(), 1, "<div></div>".to_string());
    let position = Position::new(0, 1);
    // parse_html_document
    let data_manager = HTMLDataManager::new(true, None);
    let html_document = HTMLLanguageService::parse_html_document(&document, &data_manager);
    assert!(html_document.roots.len() > 0);
}

Re-exports§

pub use language_facts::data_manager::HTMLDataManager;
pub use parser::html_parse::parse_html_document;

Modules§

html_data
language_facts
parser
participant

Structs§

DefaultDocumentContext
FileStat
HTMLLanguageService
This is a collection of features necessary to implement an HTML language server
HTMLLanguageServiceOptions

Enums§

FileType

Traits§

DocumentContext
FileSystemProvider