Skip to content
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

merlin-locate does not work on +. #949

Closed
Chris00 opened this issue Apr 4, 2019 · 4 comments · Fixed by #1612
Closed

merlin-locate does not work on +. #949

Chris00 opened this issue Apr 4, 2019 · 4 comments · Fixed by #1612
Labels

Comments

@Chris00
Copy link
Member

Chris00 commented Apr 4, 2019

merlin-locate does not work when the point in on a dotted infix operator such as +. (in Emacs).

Example:

module A = struct
  let ( +. ) a b = a +. b
end

let f x = A.(x +. 1.)

(put the cursor on the latest +. and M-x merlin-locate).

@trefis
Copy link
Contributor

trefis commented Oct 25, 2019

The answer I get when I try it is Not in environment ''.

Note for whoever tries to fix this: looks like a bug in reconstruct_identifier.

@rgrinberg
Copy link
Member

I had a brief look, and I think it might be a bug in Longident.parse instead. Longident.parse "+." does not seem to work as expected.

cc @gasche

@gasche
Copy link
Member

gasche commented Dec 22, 2019

(I gave some context in ocaml-ppx/ppxlib#111 (comment).)

For the needs of Merlin, the choice of exposing the more robust functions from the parser seems reasonable. Should we experiment with a PR to do this in trunk?

@Octachron
Copy link
Member

Should I add a generic Longident.t parser to ocaml/ocaml#9021?

rgrinberg added a commit to rgrinberg/merlin that referenced this issue Dec 23, 2019
Looking up the definition of `+.` fails

Signed-off-by: Rudi Grinberg <[email protected]>
trefis pushed a commit that referenced this issue Jan 9, 2020
Looking up the definition of `+.` fails

Signed-off-by: Rudi Grinberg <[email protected]>
voodoos added a commit to voodoos/merlin that referenced this issue Mar 18, 2022
voodoos added a commit to voodoos/merlin that referenced this issue Mar 31, 2022
voodoos added a commit to voodoos/merlin that referenced this issue Nov 25, 2022
voodoos added a commit to voodoos/merlin that referenced this issue Nov 25, 2022
voodoos added a commit to voodoos/merlin that referenced this issue Nov 25, 2022
voodoos added a commit to voodoos/merlin that referenced this issue Feb 1, 2023
voodoos added a commit to voodoos/merlin that referenced this issue May 23, 2023
 about locating infix operators
voodoos added a commit to voodoos/merlin that referenced this issue May 24, 2023
 about locating infix operators
voodoos added a commit to voodoos/merlin that referenced this issue May 24, 2023
voodoos added a commit to voodoos/merlin that referenced this issue May 24, 2023
 about locating infix operators
voodoos added a commit to voodoos/merlin that referenced this issue May 24, 2023
voodoos added a commit to voodoos/merlin that referenced this issue May 24, 2023
 about locating infix operators
voodoos added a commit to voodoos/merlin that referenced this issue May 26, 2023
voodoos added a commit to voodoos/merlin that referenced this issue May 26, 2023
 about locating infix operators
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants