aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim/lsp/protocol.lua
diff options
context:
space:
mode:
authorkishii <24446852+zhoudaxia2016@users.noreply.github.com>2023-01-21 15:22:34 +0800
committerGitHub <noreply@github.com>2023-01-21 08:22:34 +0100
commit7ef5e363d360f86c5d8d403e90ed256f4de798ec (patch)
treef85d53931f830f0b332082d5f27be8df02f0cbe0 /runtime/lua/vim/lsp/protocol.lua
parente86d2734a93e159d44df8132dee6b994e5922d18 (diff)
downloadrneovim-7ef5e363d360f86c5d8d403e90ed256f4de798ec.tar.gz
rneovim-7ef5e363d360f86c5d8d403e90ed256f4de798ec.tar.bz2
rneovim-7ef5e363d360f86c5d8d403e90ed256f4de798ec.zip
feat(lsp): add triggerKind option for vim.lsp.buf.code_action (#21905)
Diffstat (limited to 'runtime/lua/vim/lsp/protocol.lua')
-rw-r--r--runtime/lua/vim/lsp/protocol.lua11
1 files changed, 11 insertions, 0 deletions
diff --git a/runtime/lua/vim/lsp/protocol.lua b/runtime/lua/vim/lsp/protocol.lua
index 92cda0b34f..12345b6c8c 100644
--- a/runtime/lua/vim/lsp/protocol.lua
+++ b/runtime/lua/vim/lsp/protocol.lua
@@ -304,6 +304,17 @@ local constants = {
-- Base kind for an organize imports source action
SourceOrganizeImports = 'source.organizeImports',
},
+ -- The reason why code actions were requested.
+ ---@enum lsp.CodeActionTriggerKind
+ CodeActionTriggerKind = {
+ -- Code actions were explicitly requested by the user or by an extension.
+ Invoked = 1,
+ -- Code actions were requested automatically.
+ --
+ -- This typically happens when current selection in a file changes, but can
+ -- also be triggered when file content changes.
+ Automatic = 2,
+ },
}
for k, v in pairs(constants) do