Leonardo de Moura
ff1d27370c
feat: add CompletionInfo
2021-04-02 20:44:57 -07: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
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
f75d9f50a6
feat: (try to) improve InfoTree.goalsAt?
2021-03-29 18:43:33 -07: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
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
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
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
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
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
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
Sebastian Ullrich
2a45525b24
chore: clean up code
2021-01-21 15:00:38 +01:00
Sebastian Ullrich
fbb1184f25
feat: auto-add stdlib to LEAN_SRC_PATH for installed Lean
2021-01-21 14:18:52 +01:00
Sebastian Ullrich
a9f96ace3e
chore: naming
2021-01-20 16:48:50 +01:00
Sebastian Ullrich
79107a2316
feat: copy & store whole ref range in SourceInfo
2021-01-20 16:48:50 +01:00
Wojciech Nawrocki
445420315e
fix: normalise go-to-def paths
2021-01-19 13:22:13 -08:00
Wojciech Nawrocki
90075153b3
fix: UTF-16 strikes again
...
We need to report the jump target range in terms of a UTF-16 offset within the line, but to compute that we would have to load the target file, file-map it, and resolve that way each time the go-to-def handler runs. As an alternative, this stores the UTF-16 offsets in `DeclarationRange`.
2021-01-19 13:22:13 -08:00
Wojciech Nawrocki
e627ad308d
feat: go-to-definition
2021-01-19 13:22:13 -08:00
Wojciech Nawrocki
40698ecc07
feat: LSP scaffolding for go-to-definition
2021-01-19 13:22:13 -08:00
Wojciech Nawrocki
f07cf2c4e4
feat: store source path in server worker
2021-01-19 13:22:13 -08:00
Sebastian Ullrich
bc0f43c4b9
chore: remove a few dbgTraceVals...
2021-01-19 19:31:44 +01:00
Sebastian Ullrich
38911d1be3
feat: Nix: support leanpkg print-paths setup
2021-01-19 19:06:01 +01:00
Sebastian Ullrich
8ad061e328
feat: leanpkg: change print-path to print-paths that also emit LEAN_SRC_PATH (unused as of yet)
2021-01-19 19:06:01 +01:00
Sebastian Ullrich
e5c485ff45
feat: incremental progress notification while compiling dependencies
2021-01-19 19:06:01 +01:00
Sebastian Ullrich
d7733ba662
feat: use leanpkg print-path for worker initialization
2021-01-19 19:06:01 +01:00
Sebastian Ullrich
35e4f7391a
feat: publish fatal worker error as diagnostic
2021-01-19 19:06:01 +01:00
Wojciech Nawrocki
d7c201a2d4
chore: minor hover code cleanup
2021-01-15 13:29:22 -08:00
Sebastian Ullrich
fa7e679c73
feat: hover: use syntax highlighting
2021-01-15 13:29:22 -08:00
Wojciech Nawrocki
310a2ab6a3
feat: minimal hovers MVP
2021-01-15 13:29:22 -08:00
Wojciech Nawrocki
cba3d69e78
feat: enable info trees in server
2021-01-15 13:29:22 -08:00
Wojciech Nawrocki
5a46f43b56
fix: elab cancellation on server exit
2021-01-15 13:29:22 -08:00
Sebastian Ullrich
3a9658b91f
chore: obsolete comment
2021-01-13 16:39:00 +01:00