-
Notifications
You must be signed in to change notification settings - Fork 185
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
detailedLabelSupport not correctly implemented #1924
Comments
There is no feasible solution. With ST's API, things you can fill in are Related discussion |
Oh i see, is it being looked at by the sublime text developpers? |
I am looking at the image for the expect behavior For me the LSP signature popup is used to show the parameters for a given function. Is it helpful to see a pretty wide autocomplete popup with a bunch of information? |
showing all the lines isn't the point of the feature, let's ignore it for the moment (note that it is the case already for ST, it shows all the lines already with duplicate info) it's the fact that no information is duplicated anymore before:
why is after:
There is less confusing, and the duplication of information is no more, shorter, and less distraction -- Then for showing all the lines at once, it could be an option |
|
|
Yes, but I meant that maybe the D server expects
Sublime LSP also supports and uses insertText. The point is that the "trigger" field is used for filtering. For example if you type
OK, then the screenshot from VSCode makes sense. |
|
Maybe LSP should favor if isinstance(lsp_label_description, str):
# `description` should be rendered less prominent than `detail`.
# Additional separation is added.
- st_details += " - {}".format(_wrap_in_tags("i", lsp_label_description))
+ st_annotation = lsp_label_description.replace('\n', ' ')
st_details += "</p>" This would be sililar to what VSCode uses on the right side for the items. But it would be useful to know if other language servers use the fields in the same way. |
From the servers I'm using regularly (LSP-typescript, LSP-pyright, LSP-vue, LSP-dockerfile, LSP-json, LSP-terraform, LSP-yaml), none of them supports |
The more we have to wait, the more i'm suggesting people to use vscode instead I just sent this PR over there, and it works out of the box with vscode It is a shame that it takes that long for sublime text to eventually think about an eventuality that it could eventually be added in the future, eventually |
What do you mean by “sublime text”? We’re all unpaid volunteers here. Please also research clangd on how it renders the labelDetails. |
What clangd does is incomplete You need to understand why the feature was created and proposed for the LSP 3.17 spec It is to show information on all the completion items, not just the selected one, otherwise it makes no sense I understand it is volunteers effort, i volunteer my time to improve many people's experiences too, i am just sad nobody follows, sublime is not open source, so there is nothing much i can do other than bump issues i opened |
LSP is open source and it's possible to experiment with it per @jwortmann's comment. But if you'd expect a more complete solution from Sublime Text itself then it would need to be requested in its bug tracker (if it isn't already). |
Did a quick change for testing: #2002 |
Thanks! As expected, the result looks a little bit hard to differentiate, wich ends up being the hack that was used prior to that LSP suggestion Something like that would be better Can theming be applied to that string so a contrast/brightness filter could be applied? |
No, the left-aligned part of the completion is a plain text and can't have styling applied. |
This influences the matching algorithm, which is not acceptable for me.
The effect you want to achieve cannot be done as there are only three slots in the completion widget which can be filled in; one is left-aligned and determines the matching, one is right-aligned and dimmed, and the last is a "detail" field (which can have styling). If you want to have this "trigger detail" in ST, you need to open a feature request here: https://github.com/sublimehq/sublime_text/issues |
Summarizing, detailed label support is something that must also be supported from ST core. We can only do so much with the slots currently given. I hope the changes suite your workflow better. Overall I hope you get work done with your 3D engine regardless of the particular completion widget details. |
Describe the bug
A screenshot worth more than words:
actual:
expected: (vscode)
To Reproduce
Use D's LSP according to the documentation
https://github.com/Pure-D/serve-d/
https://lsp.sublimetext.io/language_servers/#d
Expected behavior
with detailedLabelSupport, i expect each completion item to properly strip the funciton parameters, so it doesn't show the item label twice..
Screenshots
please refer to the 1st block above
Environment (please complete the following information):
The text was updated successfully, but these errors were encountered: