diff options
author | Mathias Fußenegger <mfussenegger@users.noreply.github.com> | 2022-11-19 10:48:49 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-19 10:48:49 +0100 |
commit | af204dd0f193c3cd3154156c9f9fd40199b840c6 (patch) | |
tree | 9edb14530ecad40c0d60b114ceeb0424af902ba8 /runtime/lua/vim/lsp/protocol.lua | |
parent | 0958dccc6ddeca2e4ab36c1a0f444d2d5995ae99 (diff) | |
download | rneovim-af204dd0f193c3cd3154156c9f9fd40199b840c6.tar.gz rneovim-af204dd0f193c3cd3154156c9f9fd40199b840c6.tar.bz2 rneovim-af204dd0f193c3cd3154156c9f9fd40199b840c6.zip |
feat(lsp): run handler in coroutine to support async response (#21026)
To illustrate a use-case this also changes `window/showMessageRequest`
to use `vim.ui.select`
Diffstat (limited to 'runtime/lua/vim/lsp/protocol.lua')
-rw-r--r-- | runtime/lua/vim/lsp/protocol.lua | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/runtime/lua/vim/lsp/protocol.lua b/runtime/lua/vim/lsp/protocol.lua index 7442c8f005..8dc93b3b67 100644 --- a/runtime/lua/vim/lsp/protocol.lua +++ b/runtime/lua/vim/lsp/protocol.lua @@ -20,6 +20,14 @@ function transform_schema_to_table() end --]=] +---@class lsp.ShowMessageRequestParams +---@field type lsp.MessageType +---@field message string +---@field actions nil|lsp.MessageActionItem[] + +---@class lsp.MessageActionItem +---@field title string + local constants = { DiagnosticSeverity = { -- Reports an error. @@ -39,6 +47,7 @@ local constants = { Deprecated = 2, }, + ---@enum lsp.MessageType MessageType = { -- An error message. Error = 1, |