Repository navigation
Add deprecated boolean property to CompletionItem and SymbolInformation - #332
Conversation
|
Remy Suen (@rcjsuen) thanks for the PR. Since the PR adds new properties to items that flow into both directions (form client -> server and server -> client) we need to add a client capability if the client can handle the property correctly. Otherwise a server might be surprised if for example the deprecated property is lost when a completion items flows from the client to a server in a completion item resolve call. |
|
Dirk Bäumer (@dbaeumer) Thank you for the review, Dirk. I understand what you mean. Does this look okay? export interface TextDocumentClientCapabilities {
completion?: {
completionItem?: {
/**
* Client supports the deprecated property on a completion item.
*/
deprecatedSupport?: boolean
}
}
} |
|
Dirk Bäumer (@dbaeumer) And just to double-check, I don't need to add a new capability for the |
|
I tried adding a capability but the Travis CI build didn't go through. Will investigate some more... |
|
I think the symlinking part of the build isn't quite working out for me. |
|
As VS Code doesn't read the |
|
Remy Suen (@rcjsuen) correct. |
Introduce a new boolean property to indicate if a CompletionItem or a SymbolInformation is depreated. Signed-off-by: Remy Suen <[email protected]>
b6d03cd to
ca04df9
Compare
|
Dirk Bäumer (@dbaeumer) Thanks, Dirk. I have updated this pull request. Since VS Code doesn't support this feature I didn't bother updating |
|
Remy Suen (@rcjsuen) thanks for the PR. I merged it in. Think about it we should try to preserve the value also VS Code doesn't support deprecation. But you can do this with a separate PR. |
|
Remy Suen (@rcjsuen) can you please update the specification as well. This is necessary so that we can release a new version. |
|
Hi, Dirk Bäumer (@dbaeumer), thanks for merging this in. I've opened microsoft/language-server-protocol#465 for updating the spec. Regarding your earlier comment, please confirm the following.
If the above is correct I will open a new PR. If I misunderstood anything, please let me know. Thanks! |
|
Remy Suen (@rcjsuen) regarding the questions:
EDIT: actually we should return true. The fact that it is not rendered is not something the server needs to know. Interesting is that the value is correctly preserved. |
|
Thank you, Dirk Bäumer (@dbaeumer). I've opened #347 based on your response. |
I've added a new boolean
deprecatedproperty bothCompletionItemandSymbolInformation.See microsoft/language-server-protocol#139.