loalang 0.1.15

Loa is a general-purpose, purely immutable, object-oriented programming language.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use crate::server_handler::*;

pub struct DidOpenTextDocumentNotificationHandler;

impl NotificationHandler for DidOpenTextDocumentNotificationHandler {
    type N = notification::DidOpenTextDocument;

    fn handle(context: &mut ServerContext, params: DidOpenTextDocumentParams) -> Option<()> {
        let uri = convert::from_lsp::url_to_uri(&params.text_document.uri);
        context
            .server
            .set(uri, params.text_document.text, loa::SourceKind::Module);
        context.postpone_publish_updated_diagnostics();
        Some(())
    }
}