aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim/lsp/protocol.lua
diff options
context:
space:
mode:
authorMathias Fußenegger <mfussenegger@users.noreply.github.com>2022-11-19 10:48:49 +0100
committerGitHub <noreply@github.com>2022-11-19 10:48:49 +0100
commitaf204dd0f193c3cd3154156c9f9fd40199b840c6 (patch)
tree9edb14530ecad40c0d60b114ceeb0424af902ba8 /runtime/lua/vim/lsp/protocol.lua
parent0958dccc6ddeca2e4ab36c1a0f444d2d5995ae99 (diff)
downloadrneovim-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.lua9
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,