imandra-ai / imandra-vscode

VSCode extension for developing imandra
Other
2 stars 0 forks source link

Cmd-Click (goto definition) fails with wrong path #7

Closed grantpassmore closed 6 years ago

grantpassmore commented 6 years ago

Cmd+Click on a definition gives an error, looking for the file in the wrong (global?) path.

For example, if I have an IML file in a workspace (under, e.g., /Users/grant/AI/imandra-workspace/nat.iml), and I Cmd+Click on an instance of a function which is defined within the file, I get the following error:

image

It seems it's looking for nat.ml in the wrong place.

grantpassmore commented 6 years ago

Similarly, peek definition fails as well

ewenmaclean commented 6 years ago

I am trying to figure this out but I think it may well be this line:

https://github.com/freebroccolo/ocaml-language-server/blob/master/src/bin/server/session/indexer.ts#L57

which means we need our own version of ocaml-language-server in reality to make this work properly. I can of course add this to the upstream PR but of course we don't know how long that will take.

grantpassmore commented 6 years ago

Awesome investigative work. Hmm, maybe we just have to bite the bullet and fork?

ewenmaclean commented 6 years ago

Yep possibly. Let me see what's needed for the server stuff - what I could do is produce a custom reason plugin then depend on that if that's feasible in conjunction with the lean like stuff I need to figure out.

ewenmaclean commented 6 years ago

This is actually a merlin issue - I have made a temporary fix for it with a fork of merlin, but am working on a more principled PR which will allow you to define suffixes and their associations