-
Notifications
You must be signed in to change notification settings - Fork 234
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
[503] Project-wide renaming #1877
base: main
Are you sure you want to change the base?
Conversation
01c1bb0
to
f211402
Compare
Suggested-by: art-w <[email protected]>
7e10b7e
to
2ebcb21
Compare
in | ||
Uid_map.find_opt uid related_uids | ||
|> Option.value_map ~default:Uid_set.empty ~f:Union_find.get | ||
|> Uid_set.to_list |
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.
Maybe a detail but:
related_uids
|> Uid_map.find_opt uid
|> Option.value_map
~default:[]
~f:(fun x -> x |> Union_find.get |> Uid_set.to_list)
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.
(feel free to discard the comment)
type 'a content = | ||
| Root of { mutable value : 'a; mutable rank : int } | ||
| Link of { mutable parent : 'a element } | ||
and 'a element = { mutable content : 'a content } |
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.
Why not just defining an element as a ref
(since it is exactly the same type)?
and 'a element = 'a content ref
Maybe you will add, in the future, more information?>
This PR adds initial support for project-wide Renaming:
occurrences
with the new scopeRenaming
, Merlin will return all the usages of the definition corresponding to the selected identifier, all the declarations/definitions linked to that definition and all the usages of all these definitions.This PR is based on #1857
Todo