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

OCaml keywords are not suggested #183

Closed
yannl35133 opened this issue May 7, 2020 · 6 comments
Closed

OCaml keywords are not suggested #183

yannl35133 opened this issue May 7, 2020 · 6 comments

Comments

@yannl35133
Copy link
Contributor

I suggest OCaml keywords be included in suggestions.
This is mostly an issue when you type in and hit Return, as most of the time another value beginning by in will be inserted instead, and this is annoying

@mnxn
Copy link
Collaborator

mnxn commented May 8, 2020

I've noticed this too.

However, I believe this should be handled by https://github.com/ocaml/ocaml-lsp as the language server protocol allows keywords in completion entries. That way, keyword completion will be present in other editors that use ocaml-lsp too.

@rgrinberg
Copy link
Contributor

@yannl35133 try pinning ocamllsp. I've added experimental support for keyword completion.

@ian-barnes
Copy link

I find this annoying too, happens every single time I type let foo = ... in. It happens with the (Merlin-based?) OCaml and Reason IDE extension also. Part of why I switched was I hoped it wouldn't happen here.

@rgrinberg Can you be a little more specific with your instructions there? opam pin add ocaml-lsp ...? Sorry, I'm not yet an Opam wizard.

@ulugbekna
Copy link
Collaborator

@ian-barnes The new ocaml-lsp v1.2.0 is published already with keyword completion. opam update && opam upgrade ocaml-lsp-server (Didn't work for me somehow though)

You can pin ocaml-lsp package by doing opam pin add ocaml-lsp-server https://GitHub.com/OCaml/ocaml-lsp.git#master.

@ian-barnes
Copy link

ian-barnes commented Nov 18, 2020

Cool, thanks!

Yes, the update & upgrade isn't working for me either, still has it at v1.1.0...

... and same with pinning to master. That's weird. Does 1.2.0 depend on Ocaml 4.11 or something?

But it works anyway, so who cares?

@rgrinberg
Copy link
Contributor

and same with pinning to master. That's weird. Does 1.2.0 depend on Ocaml 4.11 or something?

It does not.

If there are installation problems with ocamllsp, please ask on discuss. 1.2.0 was merged to opam quite recently so you might need to do $ opam update again and confirm that it's there with $ opam info ocaml-lsp-server.

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

5 participants