Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Local binding hints (WIP)#4610

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Draft
cassandracomar wants to merge35 commits intohaskell:master
base:master
Choose a base branch
Loading
fromcassandracomar:local-binding-hints

Conversation

cassandracomar
Copy link

@cassandracomarcassandracomar commentedJun 2, 2025
edited
Loading

continuation of#4368.

so far, I've merged in changes in master and updated things so they compile with ghc-9.12.

TODO:

  1. get tests passing (the 9.12 flakes seem flaky)
  2. allow both code lenses and inlay hints for rendering local sig hints, via a configurable toggle.

update: this now allows either code lenses or inlay hints for local bindings. aswe discussed, I've defaulted this to code lenses, with an optional toggle to flip on inlay hints instead. but the code lenses don't have their tests restored as yet. will reintroduce those tomorrow.

July541and others added30 commitsJune 17, 2022 18:38
Co-authored-by: fendor <fendor@users.noreply.github.com>
Now let and where clause will show binding type in inlay hints
properties = emptyProperties
& defineEnumProperty #mode "Control how type lenses are shown"
[ (Always, "Always displays type lenses of global bindings")
, (Exported, "Only display type lenses of exported global bindings")
, (Diagnostics, "Follows error messages produced by GHC about missing signatures")
] Always
& defineBooleanProperty #localBindingInlayHintOn
"Display inlay hints of local bindings"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

this needs a better explanation for documentation

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

this may also be clearer as a three-way enum calledlocalBindingHintsMode with the optionsNoLocalHints,UseInlayHints,UseCodeLenses.

happy to let others bikeshed this, though.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Yeah, sounds good, although I'm somewhat tempted towards a global option for the user preference here.

"mode": "always"
},
"globalOn": true
"inlayHintsOn": true

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

regenerate these

fendor reacted with thumbs up emoji
@michaelpj
Copy link
Collaborator

I wonder what to do about inlay hints vs code lenses. As I commented in the other issue, I do think we should prefer them if we can. But maybe we need a consistent approach. e.g. something like:

  • a global "preferred in-buffer display mode: inlay hints/code lenses", default inlay-hints
  • if it's set to inlay hints then use inlay hints if the client supports it otherwise fall back to code lenses

Out of scope for this PR though.

@michaelpj
Copy link
Collaborator

Give a shout if you need help/want attention on any bit of it in particular!

@cassandracomar
Copy link
Author

Give a shout if you need help/want attention on any bit of it in particular!

will do! haven't had a chance to go through the test failures.

fendor reacted with thumbs up emoji

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@michaelpjmichaelpjmichaelpj left review comments

@fendorfendorAwaiting requested review from fendorfendor is a code owner

@wz1000wz1000Awaiting requested review from wz1000wz1000 is a code owner

At least 1 approving review is required to merge this pull request.

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

5 participants
@cassandracomar@michaelpj@July541@pepeiborra@jetjinser

[8]ページ先頭

©2009-2025 Movatter.jp