-
Notifications
You must be signed in to change notification settings - Fork 846
Standardize LSP Command like 'references', 'implementations', 'triggetSuggest', 'openUri' #788
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
Comments
Makes sense to me. |
Here the default command that LSP could provide:
|
@dbaeumer I retrigger the issue and I think the best thing is to I discover today a new usecase with CSS language server when you open completion, it provides
and when you apply completion, it generates to do that it uses
As you can notice We could have a CommandKind list and LSP client could set the list of CommandKind which are supported. Language servers could use this command kind list to know if iy should generate the command or not. |
@aeschli what do you think with my |
For the completion case mit might be easier to just add a property |
On the other hand, completion can include a command and in that case it might be less clear when the "retrigger" should trigger. I feel that a dedicated command might have more obvious semantics. Also, if we have "retrigger" for completions then we'd still need something else for other cases anyway and we end up with more ways of doing the same. Not saying that those points make you suggestion unfeasible but something to think about. |
I would propose the following:
|
A lot of language server provides
references
andimplementations
CodeLens. As there are no standardization about those 2 commands, it causes extra code:On server side, it requires that :
references
andimplementations
command name (ex:java.show.references
for jdt.ls)supportReferences
) in the InitializeParams.On client side:
supportReferences
) in the InitializeParams.java.show.references
for jdt.ls) to open the references dialog.To avoid doing those extra code (on server and client side) and give the capability to have references and implementations which works directly (without implementing custom command on client side and without implementing custom capability on server side), we could standardize the 2 commands. The idea is to consume a language server in a client and click on references and implementations works directly without extra code.
The idea is to provide for instance CodeLensKind (or perhaps a CommandKind) like this:
CodeKindKindCapabilities
in the InitializeParams with (references and implementations for instance).Here the vscode implementation for references:
CodeLensKind.References
(only if client support it) and with the uri and position and that's all!The text was updated successfully, but these errors were encountered: