-
Notifications
You must be signed in to change notification settings - Fork 454
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add hover/go-to-def/refs for options #1783
Conversation
@@ -175,6 +175,9 @@ example : Nat → Nat → Nat := | |||
x | |||
--^ textDocument/hover | |||
|
|||
-- textDocument/definition -- removed because the result is platform-dependent |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately this is another of those tests that can't be written: This test jumps into the location of the lean 4 sources, which is different for the different CI runners and also for me locally. The goTo.lean tests fix this by only doing intra-file jumps, but options must be declared in a separate file so we have the usual issue about tests being single-file only.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we just replace the lean4 source directory by the empty string like we do for the tests?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know if this is desirable. We try to avoid source location references into src/ from tests since they are far from stable. It's really annoying when supposedly unrelated tests suddenly fail.
I don't know what is being asked of me here. I think the test scripts need to be rewritten in some way? |
I would have liked to have the test included. To be clear my suggestion was to add a But I don't want to block the PR on that. @Kha do you have any issues with this PR? |
Now, clicking on
foo
inset_option foo true
takes you to theregister_option
declaration forfoo
, if one exists; hover shows the docstring for the declaration, or the option's description; and find references on the declaration takes you to uses of theset_option
.