lean4-htt/src/Lean
Marc Huisinga dcd70cbfba
feat: inlay hint refinements (#6959)
This PR implements a number of refinements for the auto-implicit inlay
hints implemented in #6768.
Specifically:
- In #6768, there was a bug where the inlay hint edit delay could
accumulate on successive edits, which meant that it could sometimes take
much longer for inlay hints to show up. This PR implements the basic
infrastructure for request cancellation and implements request
cancellation for semantic tokens and inlay hints to resolve the issue.
With this edit delay bug fixed, it made more sense to increase the edit
delay slightly from 2000ms to 3000ms.
- In #6768, we applied the edit delay to every single inlay hint request
in order to reduce the amount of inlay hint flickering. This meant that
the edit delay also had a significant effect on how far inlay hints
would lag behind the file progress bar. This PR adjusts the edit delay
logic so that it only affects requests sent directly after a
corresponding `didChange` notification. Once the edit delay is used up,
all further semantic token requests are responded to without delay, so
that the only latency that affects how far the inlay hints lag behind
the progress bar is how often we emit refresh requests and how long VS
Code takes to respond to them.
- For inlay hints, refresh requests are now emitted 500ms after a
response to an inlay hint request, not 2000ms, which means that after
the edit delay, inlay hints should only lag behind the progress bar by
about up to 500ms. This is justifiable for inlay hints because the
response should be much smaller than e.g. is the case for semantic
tokens.
- In #6768, 'Restart File' did not prompt a refresh, but it does now.
- VS Code does not immediately remove old inlay hints from the document
when they are applied. In #6768, this meant that inlay hints would
linger around for a bit once applied. To mitigate this issue, this PR
adjusts the inlay hint edit delay logic to identify edits sent from the
client as being inlay hint applications, and sets the edit delay to 0ms
for the inlay hint requests following it. This means that inlay hints
are now applied immediately.
- In #6768, hovering over single-letter auto-implicit inlay hints was a
bit finicky because VS Code uses the regular cursor icon on inlay hints,
not the thin text cursor icon, which means that it is easy to put the
cursor in the wrong spot. We now add the separation character (` ` or
`{`) preceding an auto-implicit to the hover range as well, which makes
hovering over inlay hints much smoother.
2025-02-06 16:43:56 +00:00
..
Compiler fix: don't strip macro scopes in names of specialized LCNF decls (#6930) 2025-02-04 03:43:18 +00:00
Data chore: restore example after stage0 update (#6942) 2025-02-04 18:02:59 +00:00
DocString fix: Lake: brittle dependency on env ext name 2024-10-07 13:26:07 +02:00
Elab feat: inlay hint refinements (#6959) 2025-02-06 16:43:56 +00:00
Language feat: frontend & server support for plugins (#6893) 2025-02-04 23:36:18 +00:00
Linter feat: add internal linter for List/Array/Vector variable names (#6966) 2025-02-06 04:49:21 +00:00
Meta feat: binderNameHint (#6947) 2025-02-06 11:03:27 +00:00
Parser feat: allow anonymous equality proofs in match expressions (#6853) 2025-02-04 16:09:21 +00:00
ParserCompiler
PrettyPrinter feat: make all app unexpanders respond to pp.tagAppFns (#6730) 2025-02-02 23:29:12 +00:00
Server feat: inlay hint refinements (#6959) 2025-02-06 16:43:56 +00:00
Util feat: frontend & server support for plugins (#6893) 2025-02-04 23:36:18 +00:00
Widget feat: generalize infoview.maxTraceChildren to the cmdline (#6716) 2025-01-21 02:06:24 +00:00
AddDecl.lean feat: asynchronous code generation (#6770) 2025-02-03 17:17:18 +00:00
Attributes.lean refactor: dead code AttributeExtensionOLeanEntry.decl (#5496) 2024-10-01 13:34:12 +00:00
AuxRecursor.lean
BuiltinDocAttr.lean
Class.lean chore: move MessageData.ofConstName earlier (#5877) 2024-10-29 21:23:51 +00:00
Compiler.lean
CoreM.lean feat: asynchronous code generation (#6770) 2025-02-03 17:17:18 +00:00
Data.lean feat: add date and time functionality (#4904) 2024-11-14 14:04:19 +00:00
Declaration.lean feat: add support for constructors and axioms to the grind E-matching module (#6839) 2025-01-29 05:22:05 +00:00
DeclarationRange.lean feat: labeled and unique sorries (#5757) 2024-12-11 23:53:02 +00:00
DocString.lean feat: recommended_spelling command (#6869) 2025-02-03 11:15:52 +00:00
Elab.lean feat: #info_trees in command (#6964) 2025-02-06 03:11:53 +00:00
Environment.lean feat: frontend & server support for plugins (#6893) 2025-02-04 23:36:18 +00:00
Exception.lean feat: split Lean.Kernel.Environment from Lean.Environment (#5145) 2025-01-18 18:42:57 +00:00
Expr.lean chore: fix typo in docstring of mkMVar (#6687) 2025-01-18 12:28:33 +00:00
HeadIndex.lean
Hygiene.lean
ImportingFlag.lean
InternalExceptionId.lean feat: change Array.get to take a Nat and a proof (#6032) 2024-11-12 03:30:46 +00:00
KeyedDeclsAttribute.lean
LabelAttribute.lean chore: update copyrights (#5449) 2024-09-24 05:27:53 +00:00
Level.lean fix: add a missing case to Level.geq (#2689) 2024-11-19 21:27:00 +00:00
Linter.lean chore: fix variable names in List lemmas (#6953) 2025-02-05 09:49:14 +00:00
LoadDynlib.lean feat: Lean.loadPlugin (#6130) 2024-11-27 09:56:31 +00:00
LocalContext.lean doc: split the docstring of LocalContext (#6340) 2024-12-15 21:35:25 +00:00
Log.lean
Message.lean feat: generalize infoview.maxTraceChildren to the cmdline (#6716) 2025-01-21 02:06:24 +00:00
Meta.lean feat: binderNameHint (#6947) 2025-02-06 11:03:27 +00:00
MetavarContext.lean feat: Nat.(fold|foldRev|any|all)M? take a function which sees the upper bound (#6139) 2024-11-22 03:05:51 +00:00
Modifiers.lean feat: Environment.addConstAsync (#6691) 2025-01-19 02:00:16 +00:00
MonadEnv.lean fix: bring elaborator in line with kernel for primitive projections (#5822) 2024-10-31 03:16:52 +00:00
Parser.lean
ParserCompiler.lean feat: rename List.enum(From) to List.zipIdx, and Array/Vector.zipWithIndex to zipIdx (#6800) 2025-01-28 23:34:30 +00:00
PrettyPrinter.lean feat: do not propagate pretty printer errors through messages (#3696) 2024-12-11 04:10:09 +00:00
PrivateName.lean feat: Environment.addConstAsync (#6691) 2025-01-19 02:00:16 +00:00
ProjFns.lean fix: modify projection instance binder info (#5376) 2024-09-20 06:03:59 +00:00
ReducibilityAttrs.lean
Replay.lean refactor: move registration of namespaces on kernel add into elaborator (#6214) 2025-01-18 23:01:29 +00:00
ReservedNameAction.lean
ResolveName.lean fix: when pretty printing constant names, do not use aliases from "non-API exports" (#5689) 2024-12-10 17:50:50 +00:00
Runtime.lean feat: link LibUV (#4963) 2024-08-12 12:33:24 +00:00
ScopedEnvExtension.lean
Server.lean
Structure.lean feat: Array.insertIdx/eraseIdx take a tactic-provided proof (#6133) 2024-11-20 09:52:38 +00:00
SubExpr.lean chore: cleanup imports (#5825) 2024-10-23 23:51:13 +00:00
Syntax.lean feat: inlay hints for auto-implicits (#6768) 2025-02-04 17:36:49 +00:00
ToExpr.lean feat: upstream ToExpr deriving handler from Mathlib (#6473) 2024-12-31 15:11:53 +00:00
ToLevel.lean feat: upstream ToLevel from mathlib (#6285) 2024-12-05 05:50:32 +00:00
Util.lean feat: add Expr.fvarsSubset (#6430) 2024-12-20 22:29:47 +00:00
Widget.lean