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

Support textDocument/codeLens request in LSP #7890

Open
goodmind opened this issue Jul 5, 2019 · 4 comments
Open

Support textDocument/codeLens request in LSP #7890

goodmind opened this issue Jul 5, 2019 · 4 comments

Comments

@goodmind
Copy link
Contributor

goodmind commented Jul 5, 2019

Proposal

Support textDocument/codeLens request

Use case

Support type annotations for top-level variables in codeLens like ReasonML and OCaml language servers

image

@goodmind
Copy link
Contributor Author

goodmind commented Jul 10, 2019

  • Worst case
    ezgif com-video-to-gif
    image

  • Normal case
    image

@vicapow
Copy link
Contributor

vicapow commented Jul 11, 2019

For context for others, is was discussed that the output in most cases might be too verbose. We could consider adding this behind some sort of configuration Flag

@mroch
Copy link
Contributor

mroch commented Jul 15, 2019

we should talk through what specific code lenses we'll support. agree that the signature might be too verbose, or redundant. but there are other lenses like find-refs that seem like a good fit.

hhvm-bot pushed a commit to facebook/hhvm that referenced this issue Jul 15, 2019
Summary:
Adds basic requests to implement facebook/flow#7890
Pull Request resolved: facebook/flow#7891

Reviewed By: gabelevi

Differential Revision: D16223318

Pulled By: mroch

fbshipit-source-id: 529906af5e00e4b4de31aefbd66dd7a20a9c07c7
@mostafaeweda
Copy link

Using CodeLens for type inference or hints might be noisy or too verbose.

While that way might be useful for languages where annotations are optional (OCaml) to demonstrate value, when possible; in other languages with strong-typing (Java, C++) or encouraged-typing, like Flow here (or TypeScript's use of CodeLens in references), it'd be better to avoid the noise and save the editor-space for code.

facebook-github-bot pushed a commit that referenced this issue Jul 15, 2019
Summary:
Adds basic requests to implement #7890
Pull Request resolved: #7891

Reviewed By: gabelevi

Differential Revision: D16223318

Pulled By: mroch

fbshipit-source-id: 529906af5e00e4b4de31aefbd66dd7a20a9c07c7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants