Leonardo de Moura
c65537aea5
feat: Option is a Monad again
...
TODO: remove `OptionM` after update stage0
see: https://leanprover.zulipchat.com/#narrow/stream/270676-lean4/topic/Do.20we.20still.20need.20OptionM.3F/near/279761084
2022-05-04 15:27:42 -07:00
Sebastian Ullrich
09e4c00c68
fix: lexical references through x := e and similar macros
2022-05-01 17:46:05 +02:00
Sebastian Ullrich
ff4a770c2d
feat: annotate match tactic alternatives with expected state
2022-04-29 16:16:09 +02:00
Sebastian Ullrich
39a0de40dd
feat: annotate <;> with expected state
2022-04-29 16:16:09 +02:00
Sebastian Ullrich
a167828b79
fix: refine previous commit's heuristic
...
Show indented state if there is no outer state that is leading & not indented
relative to the cursor position
2022-04-29 16:16:09 +02:00
Sebastian Ullrich
87b216a8e1
fix: do not show states from tactics indented further than the cursor
2022-04-29 16:16:09 +02:00
Sebastian Ullrich
cc5e7ee731
test: part of #1119
2022-04-29 16:16:09 +02:00
Sebastian Ullrich
b714a32d27
fix: revert "fix: show single final state after tactic combinator"
...
This reverts commit eb7bf2b272 .
2022-04-29 16:16:09 +02:00
Leonardo de Moura
ae913efa99
test: collect info view issues
2022-04-27 09:42:18 -07:00
Leonardo de Moura
ed12b62e28
fix: InfoTree was missing information for (pseudo) match patterns such as x + 1.
...
This kind of pattern has to be reduced to a constructor, and the
`PatternWithRef` information was being lost in the process.
2022-04-23 12:08:59 -07:00
Sebastian Ullrich
eb7bf2b272
fix: show single final state after tactic combinator
2022-04-23 17:42:32 +02:00
Sebastian Ullrich
240c5e15e9
fix: show final goal state at end of tactic combinator
2022-04-23 17:15:32 +02:00
Leonardo de Moura
4727fd6883
feat: do not hightlight auxiliary declarations used to compile recursive definitions as variables
...
They are "morally" constants.
2022-04-21 08:11:22 -07:00
Leonardo de Moura
726b735c6d
fix: using invalid name generator at ContextInfo.runMetaM
...
Already used `MVarId`s were being "reused" potentially creating cyclic
metavar assignment. See issue #1031 for an example.
closes #1031
2022-04-15 18:42:34 -07:00
Leonardo de Moura
e4304ea1de
fix: always save completion info at resolveName
...
See new test.
2022-04-10 08:00:03 -07:00
Leonardo de Moura
4d077214f9
feat: jump to definition for match pattern variables
2022-04-09 15:36:42 -07:00
Leonardo de Moura
417421dbae
fix: auto completion when autoBoundImplicit is active
2022-04-09 09:11:45 -07:00
Leonardo de Moura
3cf425ba52
fix: pattern hover information
...
We annotate patterns with the corresponding `Syntax` during
elaboration, and do not populate the info tree. Reason: the set of
pattern variables is not known during pattern elaboration.
2022-04-08 15:03:42 -07:00
Leonardo de Moura
37b321229f
feat: make sure hover information does not include @ for constants
2022-04-07 18:40:04 -07:00
Leonardo de Moura
fa9b0f6c7e
feat: remove space before propositions with inaccessible names
2022-04-07 07:54:50 -07:00
Leonardo de Moura
36e032cf94
chore: fix test
2022-04-06 14:55:27 -07:00
Leonardo de Moura
1107705525
fix: jump to definition inside recursive definitions was not working on VS Code
...
Remark: it was working on Emacs.
2022-04-06 14:27:49 -07:00
Leonardo de Moura
574927ab0d
fix: jump to definition for recursive declarations
2022-04-06 13:01:16 -07:00
Leonardo de Moura
149cd1ee82
chore: fix test
2022-04-05 21:04:55 -07:00
Leonardo de Moura
27e07d1b25
fix: remove auxiliary discriminants before elaborating patterns
2022-04-05 19:37:56 -07:00
Leonardo de Moura
78007be772
test: for Lean 3 hover issue reported on Zulip
2022-04-02 15:21:24 -07:00
Leonardo de Moura
9fe5458077
feat: do not display inaccessible proposition names if they do not have forward dependencies
...
Even if `pp.inaccessibleNames = true`
2022-04-02 13:15:17 -07:00
Leonardo de Moura
e53435979f
fix: remove hacky addAutoBoundImplicitsOld
2022-03-25 09:23:43 -07:00
Leonardo de Moura
6631d92d7b
fix: addAutoBoundImplicitsOld occurrences at MutualDef.lean and Structure.lean
...
This commit also fixes non-termination at `collectUnassignedMVars`
2022-03-25 09:07:59 -07:00
Leonardo de Moura
e48cc8901e
fix: add new addAutoBoundImplicits that avoids the hack at addAutoBoundImplicitsOld
2022-03-25 08:40:57 -07:00
Mario Carneiro
c29da66c5a
fix: annotate binders in intro for hover / go to def
2022-03-22 12:10:51 +00:00
Leonardo de Moura
3862e7867b
refactor: make String.Pos opaque
...
TODO: this refactoring exposed bugs in `FuzzyMatching` and `Lake`
closes #410
2022-03-20 10:47:13 -07:00
larsk21
64dba41b4c
feat: enable fuzzy matching for completion
2022-03-11 16:25:26 -08:00
Jonathan Coates
11cce61e4d
chore: Clean up LSP folding a little
...
- Wait for all terms to be elaborated before showing folding regions.
May want to change this to support partial results.
- Use .span to extract import statements, rather than mutually
recursive functions.
- Some tiny other bits of cleanup
2022-03-07 17:23:35 +01:00
Jonathan Coates
04e60cebd1
feat: LSP code folding support
...
The following constructs are foldable:
- Sections and namespaces
- Blocks of import/open statements
- Multi-line commands (so mostly definitions)
- Mutual definitions
- Module-level doc comments
- Top-level definition doc comments
Fixes #1012
2022-03-07 17:23:35 +01:00
Leonardo de Moura
82b056aa75
chore: fix test
2022-03-03 19:53:35 -08:00
Leonardo de Moura
b4ddcd600b
chore: fix test
2022-03-03 19:15:07 -08:00
Leonardo de Moura
afb5cb16ee
chore: simplify option names
...
see #1011
2022-02-08 12:23:24 -08:00
Leonardo de Moura
59acf01bc9
feat: relax auto-implicit restrictions
...
The new options `relaxedAutoBoundImplicitLocal` can be used to
disable this feature.
closes #1011
2022-02-08 12:17:42 -08:00
Leonardo de Moura
e9d85f49e6
chore: remove tryPureCoe?
...
Based on the discussion at
https://leanprover.zulipchat.com/#narrow/stream/270676-lean4/topic/for.2C.20unexpected.20need.20for.20type.20ascription/near/269083574
The consensus seemed to be that "auto pure" is more confusing than its worth.
2022-02-03 16:25:24 -08:00
Leonardo de Moura
420f5bb315
fix: hide internal namespaces from autocompletion
...
closes #993
2022-02-03 13:33:27 -08:00
larsk21
e73645505b
fix: remove duplicate from interactive highlight test
2022-02-02 13:03:21 +01:00
larsk21
818e8acd0e
feat: add test for handleDocumentHighlight
2022-02-02 13:03:21 +01:00
Sebastian Ullrich
312944e784
fix: hover etc. on complex declaration name
2022-01-19 12:27:03 +01:00
Leonardo de Moura
dd3d8f6fad
feat: complete namespaces
...
closes #940
2022-01-17 10:03:36 -08:00
Joscha
6d809e7cd1
test: remove references test
...
This test no longer works since the 'references' request now requires at
least a watchdog, but this kind of test only work with file workers.
2022-01-14 09:18:57 +01:00
Gabriel Ebner
50abc3e295
fix: correctly pretty-print @Eq
2022-01-12 09:41:41 +01:00
Gabriel Ebner
f146d456ce
fix: only enable InsertReplaceEdit if supported
2022-01-07 20:28:10 +01:00
larsk21
8c2d7a35d3
fix: make set_option completion replace typed partial name
2022-01-07 17:06:26 +01:00
Sebastian Ullrich
51dc32957b
feat: show universe args on hover
...
We might also want to replace them with fresh vars to make the hover
completely independent of the context, but this change at least avoids
any hidden information.
2021-12-20 10:51:44 +01:00