feat(lsp): add triggerKind option for vim.lsp.buf.code_action (#21905)

This commit is contained in:
kishii
2023-01-21 15:22:34 +08:00
committed by GitHub
parent e86d2734a9
commit 7ef5e363d3
3 changed files with 19 additions and 0 deletions

View File

@@ -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