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

Add code lens image to the docs #2074

Merged
merged 5 commits into from
Sep 30, 2022
Merged

Add code lens image to the docs #2074

merged 5 commits into from
Sep 30, 2022

Conversation

predragnikolic
Copy link
Member

closes #2073

@rchl
Copy link
Member

rchl commented Sep 28, 2022

Maybe more interesting with something like:

Screenshot 2022-09-28 at 14 53 59

?

Also, your screenshot doesn't use default value for show_code_lens and I think it's better to show the default (or both).

@rchl
Copy link
Member

rchl commented Sep 28, 2022

With default value of show_code_lens:

Screenshot 2022-09-28 at 14 55 51

@rchl
Copy link
Member

rchl commented Sep 28, 2022

Kinda feel like the default value should be phantom now :)

@predragnikolic
Copy link
Member Author

Kind feel like we should remove the "annotation" and only leave "phantom" :D (because LSP uses annotations for code actions, code lens and maybe diagnostics in the future) but I would discuss that, before doing anything.

Yeah, I'll steal your screenshot (with phantoms) :)

@predragnikolic
Copy link
Member Author

Last commit uses annotations value for code lens.
I can revert the last commit if you like the phantoms image more.

@rchl
Copy link
Member

rchl commented Sep 28, 2022

We could show both, mentioning also the relevant option that controls that.

@LDAP
Copy link
Contributor

LDAP commented Sep 28, 2022

Kind feel like we should remove the "annotation" and only leave "phantom" :D (because LSP uses annotations for code actions, code lens and maybe diagnostics in the future) but I would discuss that, before doing anything.

Wouldn't remove it entirely. Sometimes it is quite annoying when the code shifts because new code lenses are available or the server just started.

@jwortmann
Copy link
Member

Kinda feel like the default value should be phantom now :)

I have no strong opinion about this particular setting, but I would also feel like the following settings could better use a different default value (everything is very subjective of course):

  • "show_diagnostics_panel_on_save": 2 -> 0
    Does anyone really use the default value for this setting? Wouldn't it be very annoying that the diagnostics panel pops up every time you save if a language server thinks that there are errors or warnings... perhaps it's just me and I save much too often :D
  • "show_diagnostics_in_view_status": true -> false
    Certainly it's an interesting and useful feature, but for me it feels like that this should be something to opt-in. Because status bar space is quite limited and constantly updating messages there can be a bit distractive
  • "diagnostics_gutter_marker": "dot" -> "sign"
    The different "sign" icons for the severities are clearly superior to the boring "dot" :D (in my opinion of course).
    Also one could consider to not show any gutter icon for the "hint" severity at all, because currently both "info" and "hint" are blue with the same icons and underlines, so there is no way to visibly distinguish them (but I don't know in general what should be the difference between "info" and "hint" severities from the LSP specs)
  • "link_highlight_style": "underline" -> "none"
    Would just be a subtle visual preference from my side - no decisive reason here
  • "show_references_in_quick_panel": false -> true
    The built-in "Goto Reference..." also uses the quick panel if there are multiple results. And it can easily and quickly be navigated with the keyboard.

Copy link
Contributor

@LDAP LDAP left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is docs/src/images/code-lens.png used anywhere?

@rchl rchl merged commit cdbd794 into main Sep 30, 2022
@rchl rchl deleted the docs/add-code-lens-image branch September 30, 2022 15:19
@genericptr
Copy link

I'm still a little confused about this implementation. What happens when you click the buttons? In VSCode they would bring up a panel which shows context around the code (thus the idea of a lens) but here they appear to be like code actions.

rchl added a commit that referenced this pull request Oct 11, 2022
* main:
  Allow empty string for workspace symbol request (#2071)
  Add code lens image to the docs (#2074)
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

Successfully merging this pull request may close these issues.

Add screenshots for Code Lenses in documentation
5 participants