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

VSCode CodeLens not displayed as of ocaml-lsp-server 1.16 #1164

Open
just-max opened this issue Jul 10, 2023 · 2 comments
Open

VSCode CodeLens not displayed as of ocaml-lsp-server 1.16 #1164

just-max opened this issue Jul 10, 2023 · 2 comments

Comments

@just-max
Copy link

Until ocaml-lsp-server 1.16, the OCaml Platform extension for VSCode correctly showed types above functions (with VSCode's "CodeLens"). As of 1.16, CodeLens type hints are no longer displayed. Types on hover continue to work.

ocaml-lsp-server.1.15.1-5.0:

image

ocaml-lsp-server.1.16.2 and 1.16.2:

image

A minimal example is to create one switch for each of the two versions:

opam switch create 5.0.0+lsp.1.15 5.0.0
opam switch 5.0.0+lsp.1.15
opam install "ocaml-lsp-server<1.16"

and

opam switch create 5.0.0+lsp.1.16 5.0.0
opam switch 5.0.0+lsp.1.16
opam install "ocaml-lsp-server>=1.16"

A simple project with a dune, dune-project, and single ml source file shows the problem.


OCaml version: 5.0.0 as per the switch create commands above.
System: Linux Mint, like Ubuntu
VScode version: VSCodium 1.80.0

@jfeser
Copy link
Collaborator

jfeser commented Jul 11, 2023

See 60fcf3f.

We're moving towards inlay hints to provide the code lens features.

@just-max
Copy link
Author

just-max commented Jul 12, 2023

The linked commit does not provide any context. The relevant discussion is rather in #1134. I don't have much to add to that discussion, but I would agree with Khady that dropping this feature by default before inlay hints are available effectively leaves users with a broken development experience.

The relevant fix for the VSCode extension is ocamllabs/vscode-ocaml-platform#1157. Until that is available in a release, is there any way of re-enabling CodeLens without compiling from source? For now, my solution is to install "ocaml-lsp-server<1.16", but that's obviously not a proper solution.

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