mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
lsp: Fix #12449 textDocumentSync.save can be boolean. Access textDocumentSync.save.includeText only if table. (#12450)
This commit is contained in:
parent
e78658348d
commit
b751d16cad
@ -897,7 +897,8 @@ function protocol.resolve_capabilities(server_capabilities)
|
||||
text_document_will_save = ifnil(textDocumentSync.willSave, false);
|
||||
text_document_will_save_wait_until = ifnil(textDocumentSync.willSaveWaitUntil, false);
|
||||
text_document_save = ifnil(textDocumentSync.save, false);
|
||||
text_document_save_include_text = ifnil(textDocumentSync.save and textDocumentSync.save.includeText, false);
|
||||
text_document_save_include_text = ifnil(type(textDocumentSync.save) == 'table'
|
||||
and textDocumentSync.save.includeText, false);
|
||||
}
|
||||
else
|
||||
return nil, string.format("Invalid type for textDocumentSync: %q", type(textDocumentSync))
|
||||
|
Loading…
Reference in New Issue
Block a user