Initial setup for code action attributes #
Attribute
@[hole_code_action]
collects code actions which will be called on each occurrence of a hole (_
,?_
orsorry
).Attribute
@[tactic_code_action]
collects code actions which will be called on each occurrence of a tactic.Attribute
@[command_code_action]
collects code actions which will be called on each occurrence of a command.
A hole code action extension.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Read a hole code action from a declaration of the right type.
Equations
- Lean.CodeAction.mkHoleCodeAction n = do let __discr ← read match __discr with | { env := env, opts := opts } => liftM (IO.ofExcept (Lean.CodeAction.mkHoleCodeAction.unsafe_impl_1 n env opts))
Instances For
An extension which collects all the hole code actions.
A command code action extension.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Read a command code action from a declaration of the right type.
Equations
- One or more equations did not get rendered due to their size.
Instances For
An entry in the command code actions extension, containing the attribute arguments.
- declName : Lean.Name
The declaration to tag
The command kinds that this extension supports. If empty it is called on all command kinds.
Instances For
Equations
- Lean.CodeAction.instInhabitedCommandCodeActionEntry = { default := { declName := default, cmdKinds := default } }
The state of the command code actions extension.
- onAnyCmd : Array Lean.CodeAction.CommandCodeAction
The list of command code actions to apply on any command.
The list of command code actions to apply when a particular command kind is highlighted.
Instances For
Equations
- Lean.CodeAction.instInhabitedCommandCodeActions = { default := { onAnyCmd := default, onCmd := default } }
Insert a command code action entry into the CommandCodeActions
structure.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- Lean.CodeAction.insertBuiltin args proc = ST.Ref.modify Lean.CodeAction.builtinCmdCodeActions fun (self : Lean.CodeAction.CommandCodeActions) => self.insert args proc
Instances For
An extension which collects all the command code actions.