gluon-lang/lsp-types

Unable to cast TextDocumentSyncKind to i32

Closed this issue · 0 comments

Hello,

I'm trying to create a TextDocumentChangeRegistrationOptions with the code

let textDocumentChangeRegistrationOptions = TextDocumentChangeRegistrationOptions {
    document_selector: None,
    sync_kind: 1,
};

However, I would want to use TextDocumentSyncKind::FULL instead of '1' for the sync_kind parameter, but no method exists to cast it to an i32, and the inner variable of struct TextDocumentSyncKind is private.
Do I miss something, or the enum TextDocumentSyncKind can't work with this registration option?