Commit graph

470 commits

Author SHA1 Message Date
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
Sebastian Ullrich
5f96a9fc4d fix: do not show type of sort in hover
Fixes #896
2021-12-19 11:03:15 +01:00
Leonardo de Moura
2d4d5ae96f feat: save syntax around recursive applications
Motivation: better error messages at structural and well-founded recursion.
2021-12-16 17:13:55 -08:00
Leonardo de Moura
89edc184fb feat: compleation at #print command 2021-12-15 13:13:39 -08:00
Leonardo de Moura
653b684651 feat: improve getCompletionKindForDecl 2021-12-15 12:57:09 -08:00
Leonardo de Moura
7d7c6d8be5 feat: add CompletionItemKind 2021-12-15 11:24:11 -08:00
Leonardo de Moura
31f845c5ed feat: keyword completion 2021-12-15 11:24:11 -08:00
Leonardo de Moura
d5f1a5d1d1 fix: in-word completion
closes #857
2021-12-10 15:48:35 -08:00
Sebastian Ullrich
a4633d30e2 fix: option completion after trailing . 2021-12-10 14:19:19 -08:00
Sebastian Ullrich
ce2e733f17 fix: make option completion work in presence of value 2021-12-10 14:19:19 -08:00
Leonardo de Moura
47c2d335d4 fix: completion for aliases
closes #863
2021-12-10 12:14:11 -08:00
Joscha
e4406f1785 fix: find references to function parameters in function body
With #861, the server can now connect the occurrences of parameters in the
function definition and in the function body to each other.
2021-12-10 15:25:43 +01:00
Joscha
12ee541622 fix: reference fields in constructor correctly 2021-12-10 15:25:43 +01:00
Joscha
11ba6dc216 test: add simple "find references" test 2021-12-10 15:25:43 +01:00
Sebastian Ullrich
a329896e70 feat: refine declaration ranges at instance & example 2021-11-27 07:25:15 -08:00
Sebastian Ullrich
4f15805787 feat: annotate declarations with term infos 2021-11-27 07:25:15 -08:00
larsk21
e641ae4eae fix: prefix check in set_option completion 2021-11-26 11:42:54 +01:00
Sebastian Ullrich
f7decd2d46 fix: go to definition for macro_rules etc. 2021-11-24 11:54:13 +01:00
larsk21
9028405798 fix: handle _root_ in unresolveNameGlobal with pp.fullNames 2021-11-21 15:23:21 +01:00
larsk21
8cf520209f feat: show fully-qualified name in hover text 2021-11-21 15:23:21 +01:00
Leonardo de Moura
5f119cb54f feat: avoid metavariables at CompletionItems
Not sure whether it helps or creates more confusion.
Note that we are still using the `?` prefix for metavariables on the
InfoView and hover info.
2021-10-29 08:01:21 -07:00
Leonardo de Moura
68120b24b8 feat: add docstring to CompletionItem
closes #746
2021-10-28 08:14:40 -07:00
Daniel Selsam
b36baa143f feat: improved name-unresolving in delab
Fixes #641
2021-09-07 16:26:00 +02:00
Wojciech Nawrocki
feff4c2ed3 feat: unify goal handlers 2021-08-24 08:57:41 -07:00
Wojciech Nawrocki
e8af38f586 chore: fix tests 2021-08-24 08:57:41 -07:00
Sebastian Ullrich
20accf5105 feat: revise macro parameter syntax 2021-08-12 07:48:42 -07:00
Leonardo de Moura
1d9d8c7e75 chore: fix tests
close #402
2021-08-07 13:22:58 -07:00
Daniel Selsam
e6b90dde8f fix: pp.analyze mvars can bottom-up 2021-08-03 09:13:18 +02:00
Daniel Selsam
c3d62c1076 chore: patch tests for pp.analyze default 2021-08-03 09:13:18 +02:00
Leonardo de Moura
635bc78d72 feat: use structure extension to implement Structure.lean 2021-08-02 18:03:20 -07:00
Sebastian Ullrich
42e681a5a6 fix: make unterminated comments consume all input
Fixes #549
2021-07-22 15:55:12 +02:00
Sebastian Ullrich
7e317d23db feat: term info on where declarations 2021-07-19 13:24:59 -07:00
Sebastian Ullrich
b76dd1a8e3 feat: go-to-definition for local variables 2021-07-19 13:24:59 -07:00