Skip to content

Go-to-definition does not work on custom operators #1766

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

Closed
WardBrian opened this issue Mar 26, 2025 · 2 comments
Closed

Go-to-definition does not work on custom operators #1766

WardBrian opened this issue Mar 26, 2025 · 2 comments

Comments

@WardBrian
Copy link

Go-to-definition doesn't work on custom operators, which would be very useful for navigating DSLs.

For example,

type ast = Comment of string

let ( !// ) s = Comment s

let header = !//"This file generated by %%NAME%% "
(*            ^         *)

If I place my cursor at the point indicated by the ^, go-to-definition does nothing. By contrast, if the line is

let header = (!//)"This file generated by %%NAME%% "

Then go-to-definiton does work. Obviously this is not preferrable for unary operators, and defeats the purpose for binary ones.

Apologies if this issue belongs in ocamllsp or some other repo, I'm happy to re-create it there if so.

@voodoos
Copy link
Collaborator

voodoos commented Mar 27, 2025

Thanks for reporting that issue @WardBrian, I will move it to Merlin since it it probably there that the problem should be solved.

Edit: I am not able to transfer the issue, can you re-open it there ? https://github.com/ocaml/merlin

@WardBrian
Copy link
Author

Opened in the merlin repo, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants