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

Autocomplete of "include" interferes with typing "in" #61

Closed
jfehrle opened this issue May 17, 2018 · 4 comments
Closed

Autocomplete of "include" interferes with typing "in" #61

jfehrle opened this issue May 17, 2018 · 4 comments

Comments

@jfehrle
Copy link
Collaborator

jfehrle commented May 17, 2018

plugin version: 0.50

Description

Let statements frequently end with "in" at the end of a line, for which I type "i", "n" and Enter. However, there is an autocomplete defined for "include" that shows up immediately after I type "n", at which point pressing Enter changes "in" to "include", which I then have to change back to "in". This is annoying, especially since "in" is a much more common keyword than "include". Hope you can improve this.

image

@giraud
Copy link
Owner

giraud commented May 18, 2018

Fixed in 0.51.1, I just added 'in' in the completion terms

@giraud
Copy link
Owner

giraud commented May 18, 2018

FYI, I'm working again on the ocaml side in the plugin (I'm trying to add an ocaml sdk to get completion and type inference).
So I encourage you to add more issues about ocaml :)

@giraud giraud closed this as completed May 18, 2018
@jfehrle
Copy link
Collaborator Author

jfehrle commented May 18, 2018

I submitted one more issue for you earlier.

It would awesome to make the plugin work with the OCaml parser/semantic information. I'd rank my wishes related to that in this order:

  1. Autoparsing to find common syntax/semantic errors, such as:
    Missing in at the end of a let.
    Too many parameters to a function (probably a missing ";")
    Too few parameters to a function (would be nice to highlight any place where currying is used--it's not that often).
  2. Autocomplete of symbols defined in the file or outside (e.g. "List." should show the functions available in List)
  3. Displaying type info, somehow
  4. A Structure panel showing what's in a file, similar to this one for Java:

image

@jfehrle
Copy link
Collaborator Author

jfehrle commented May 18, 2018

One other thought: In Java files, if you put the cursor on "{", IJ will highlight the matching "}". It would be neat to do something similar for OCaml. For example matching "begin" to "end". Or "let" to "in"/"and", though you'd have to recognize whether it's an inner let that has "in" or an outer let that doesn't. Or to highlight where a "match" ends.

There are other possibilities, too. Jump to the next match case, jump to the next function, jump to the next expression. Might be interesting.

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