Commit graph

284 commits

Author SHA1 Message Date
Leonardo de Moura
820495ce7a feat: black list auxiliary match applications 2021-04-04 10:37:13 -07:00
Leonardo de Moura
0586fe3200 feat: activate auto completion
There are many pending TODO's, and issues with the error recovery code.
We also need a test suite.
2021-04-03 21:01:17 -07:00
Leonardo de Moura
09ee8bddad feat: tactic name completion 2021-04-03 15:45:44 -07:00
Leonardo de Moura
20f569c033 feat: set_option completion 2021-04-03 15:06:50 -07:00
Leonardo de Moura
0a94aaabc9 feat: use expected type to prioritize completion candidates 2021-04-03 14:12:42 -07:00
Leonardo de Moura
398bbcfce3 feat: save aditional information for id completion, and suppress implicit prefix when reporting completion types 2021-04-03 12:53:32 -07:00
Leonardo de Moura
ff1d27370c feat: add CompletionInfo 2021-04-02 20:44:57 -07:00
Leonardo de Moura
d26aa5e1ab feat: black list other auxiliary constructions 2021-04-02 16:21:54 -07:00
Sebastian Ullrich
e20b2c359a feat: server: show goal state after tactic if cursor not strictly before tactic 2021-04-03 00:23:46 +02:00
Leonardo de Moura
ed4504929d refactor: add Server/Completion.lean
Add environment extension for black listing declaritions for completion.
2021-04-02 11:10:06 -07:00
Leonardo de Moura
9815d626f5 feat: hide auxiliary constructions when generating completion candidates 2021-04-02 11:10:06 -07:00
Leonardo de Moura
bc44ad65ae feat: only consider dot completion info occurring in the hover line 2021-04-02 11:10:06 -07:00
Leonardo de Moura
5e66f4c97c feat: dot completion experiment
We still need to use the expected type, fix error recovery, etc. But it
is showing signs of life for very basic examples.

It is disabled for now.
2021-04-01 23:31:38 -07:00
Leonardo de Moura
c9f4359045 feat: add DotCompletionInfo 2021-04-01 23:31:38 -07:00
Leonardo de Moura
8d00a06d97 feat: add helper functions for completion 2021-04-01 23:31:38 -07:00
Sebastian Ullrich
63b96f62e7 feat: server: auto completion skeleton 2021-04-01 18:26:17 +02:00
Sebastian Ullrich
7391e0ef92 fix: "unknown goal" on tactics nested in terms 2021-03-30 14:09:39 +02:00
Sebastian Ullrich
ac8f0526f6 feat: report goals from multiple info states 2021-03-30 11:38:34 +02:00
Sebastian Ullrich
06df67313c refactor: goalsAt? 2021-03-30 11:27:42 +02:00
Leonardo de Moura
745cff41db feat: (try to) improve InfoTree.goalsAt? (yet another heuristic) 2021-03-29 19:30:00 -07:00
Leonardo de Moura
f75d9f50a6 feat: (try to) improve InfoTree.goalsAt? 2021-03-29 18:43:33 -07:00
Sebastian Ullrich
94a9a2516a doc: update server readme 2021-03-24 14:16:37 +01:00
Sebastian Ullrich
ba285c1c45 chore: do not hide leanpkg print-paths errors
@Vtec234 I was super confused about why the LEAN_PATH seemed to be set
up the wrong way when in reality an import failed to compile. If this is
an issue in the client or on Windows, we must fix it there.
2021-03-23 15:31:21 +01:00
Leonardo de Moura
880f1372bd feat: set pp.inaccessibleNames true when visualizing tactic state
@Kha The default value (false) for `pp.inaccessibleNames == false` help when
visualizing error messages (see test
`hidingInaccessibleNames.lean`). We added this feature after to hide
intermediate variables created by `match_syntax`.
However, this default value confused me in tactic mode. For example,
it will hide a hypotheses `x : Fin 0` if nobody depends on it, but as
a user we want to know we have it since we can close the goal using
it. Thus, I added `withPPInaccessibleNames act`, it executes `act`
using `pp.inaccessibleNames true` if the user did not explicitly set
it. I use this combinator at `FileWorker` and when producing the
`unsolved goals` error message. In all other scenarios, I believe
hiding these inaccessible variables is a good thing.
2021-03-21 18:21:46 -07:00
Leonardo de Moura
d9273786c7 chore: remove when and «unless»
They are obsolete.

cc @Kha
2021-03-20 18:52:18 -07:00
Leonardo de Moura
9a5f239513 refactor: remove Monad Option and Alternative Option
We should use `OptionM` instead.
`Option` still implements `Functor` and `OrElse`.

cc @Kha
2021-03-20 18:25:25 -07:00
Sebastian Ullrich
c86f41a42b feat: command-level info trees 2021-03-20 08:28:18 -07:00
Sebastian Ullrich
86072873f4 feat: server: allow more than one ContextInfo 2021-03-20 08:28:18 -07:00
Sebastian Ullrich
3eca5787eb fix: server: more robust check for projection highlighting 2021-03-17 18:31:33 +01:00
Sebastian Ullrich
99d8e34a51 feat: server: highlight variables & field notation 2021-03-16 16:41:32 -07:00
Sebastian Ullrich
8a5344ed17 fix: server: handle requests for closed files 2021-03-16 16:41:32 -07:00
Sebastian Ullrich
002efd0db6 chore: server: exclude some nodes from semantic highlighting 2021-03-16 16:41:32 -07:00
Sebastian Ullrich
0e8272388d fix: server: semantic highlighting with multiple tokens in a line 2021-03-16 16:41:32 -07:00
Sebastian Ullrich
ddff87f7f5 feat: server: also implement full semantic token requests
because lsp-mode freaks out without them
2021-03-16 16:41:32 -07:00
Sebastian Ullrich
5df753f338 feat: server: support ranged semantic tokens (keywords only for now) 2021-03-16 16:41:32 -07:00
Sebastian Ullrich
c2f7ecaf37 feat: server: also transmit array of goals 2021-03-10 17:09:41 +01:00
Sebastian Ullrich
e2a8ee8520 feat: highlight corresponding do (if any) when hovering over return 2021-02-26 14:58:09 +01:00
Sebastian Ullrich
a519f723cd chore: improve watchdog error message on file worker crash 2021-02-26 14:58:09 +01:00
Sebastian Ullrich
7c73ff072f chore: print unhandled file worker errors to stderr 2021-02-26 14:58:09 +01:00
Sebastian Ullrich
4d8859140c feat: improve goal display markup 2021-02-06 17:25:26 +01:00
Wojciech Nawrocki
ec903f58d2 feat: bare-bones goal request handler 2021-02-06 10:41:14 +01:00
Wojciech Nawrocki
2aa4a7957e feat: configurable server edit delay 2021-02-06 10:41:14 +01:00
Wojciech Nawrocki
e383222f92 feat: hovers for fields & refactor 2021-02-06 10:41:14 +01:00
Leonardo de Moura
f57c184dbd chore: remove = true old workarounds
@Kha The old `= true` workarounds are not needed anymore, they were
due to another issue and are not related to yesterday's issue.
That is, the one exposed by the `ForIn` typeclass.
2021-02-05 13:48:03 -08:00
Sebastian Ullrich
bd5225aa09 fix: make forwardMessages tail-recursive
Just something I noticed while failing to debug an (apparently) unrelated issue hanging Emacs
2021-02-03 15:24:12 +01:00
Wojciech Nawrocki
28d6a1ebe1 fix: go-to-def paths on Windows 2021-01-28 11:45:33 -08:00
Wojciech Nawrocki
d9c6a992b5 feat: specify version in waitForDiagnostics 2021-01-22 18:02:31 +01:00
Wojciech Nawrocki
b9cc6a709f feat: amortise fileworker restarts and change processing 2021-01-22 18:02:31 +01:00
Sebastian Ullrich
c1a07e5687 chore: Nix: delete obsolete workaround 2021-01-21 15:01:40 +01:00
Sebastian Ullrich
2a45525b24 chore: clean up code 2021-01-21 15:00:38 +01:00