diff options
author | kishii <24446852+zhoudaxia2016@users.noreply.github.com> | 2023-01-21 15:22:34 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-21 08:22:34 +0100 |
commit | 7ef5e363d360f86c5d8d403e90ed256f4de798ec (patch) | |
tree | f85d53931f830f0b332082d5f27be8df02f0cbe0 /runtime/lua/vim/lsp/protocol.lua | |
parent | e86d2734a93e159d44df8132dee6b994e5922d18 (diff) | |
download | rneovim-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.lua | 11 |
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 |