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
Leonardo de Moura
873634be7e
feat: hierarchical InfoTree
2021-01-09 14:10:11 -08:00
Wojciech Nawrocki
238f5c1d70
feat: type info
2021-01-09 14:10:11 -08:00
Sebastian Ullrich
626ff28e0e
refactor: Wojciech tells me I should simply do it like this instead
2021-01-03 00:41:31 +01:00
Sebastian Ullrich
cf101fa5ae
chore: that last commit shouldn't have worked, and yet apparently it did
2021-01-02 23:45:25 +01:00
Sebastian Ullrich
d576827e60
fix: wait for imports on document symbols request
2021-01-02 23:23:54 +01:00
Wojciech Nawrocki
66a715dde1
chore: tolerate more errors in server
2021-01-02 14:32:27 -05:00
Sebastian Ullrich
4c3b247dee
feat: server: report document symbol hierarchy
2020-12-31 15:00:59 +01:00
Wojciech Nawrocki
19e395ded7
feat: begin work on mouse hovers in server
2020-12-31 10:45:58 +01:00
Sebastian Ullrich
bcc84ce49b
fix: cancellation
...
Interestingly this led to a deadlock in `edits.lean` using `-j2` (hardcoded because of #246 ), should maybe investigate this...
2020-12-30 22:34:10 +01:00
Sebastian Ullrich
8e3052fe8d
feat: server: show "processing..." message
2020-12-30 22:34:10 +01:00