Commit graph

12 commits

Author SHA1 Message Date
Garmelon
a3cb39eac9
chore: migrate more tests to new test suite (#12809)
This PR migrates most remaining tests to the new test suite. It also
completes the migration of directories like `tests/lean/run`, meaning
that PRs trying to add tests to those old directories will now fail.
2026-03-06 16:52:01 +00:00
Sebastian Ullrich
004430b568
fix: avoid new term info around def bodies (#6031)
This PR fixes a regression with go-to-definition and document highlight
misbehaving on tactic blocks.

We explicitly avoid creating term info nodes around `by` blocks, which
#5338 might accidentally do; as the new info is not relevant for the
server, it is instead moved into a custom info.

Reported at
https://leanprover.zulipchat.com/#narrow/channel/270676-lean4/topic/Go-to-def.20for.20tactics.20broken.20on.20v4.2E14.2E0-rc1.
2024-11-11 14:54:59 +00:00
Marc Huisinga
7ff7cf9b5a
feat: per-package server options (#2858)
This PR adds per-package server options to resolve #2455. It is based on
the previous work in #2456, but takes a different approach: options are
loaded for the specific file in the file worker when `print-paths` is
called, instead of loading them in the watchdog with a separate Lake
command. This change addresses review comments made in #2456.

In doing so, it introduces two new Lake config fields: 
- `leanOptions`: `-D` flag options that are passed to both the language
server and `lean` when building.
- `moreServerOptions`: `-D` flag options that are passed to the language
server.

Since `print-paths` must also accept a file path to compute the options
for that file, this PR is changing the API for `print-paths`. As there
have been numerous complaints about the name `print-paths`, I also
decided to change it to `setup-file` in this PR, since it would break
compatibility with the old Lake API anyways.

This PR deprecates the Lakefile field `moreServerArgs` in favor of
`moreGlobalServerArgs`, as suggested in the review for #2456.

Fixes #2455

---------

Co-authored-by: digama0 <mcarneir@andrew.cmu.edu>
2023-11-26 13:42:38 +00:00
larsk21
ced8df3e86 fix: references of variables with equal ranges 2022-07-13 10:35:37 +02:00
Sebastian Ullrich
a2bf2a4abd fix: info at pattern variables 2022-05-17 06:28:59 -07:00
Sebastian Ullrich
d03f0b3851 fix: set of chained lexical references 2022-05-11 17:32:06 +02:00
Sebastian Ullrich
91991649bc fix: connect occurrences of mutable variable inside and outside for in info tree 2022-05-07 15:50:26 -07:00
Sebastian Ullrich
09e4c00c68 fix: lexical references through x := e and similar macros 2022-05-01 17:46:05 +02: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
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