-
Notifications
You must be signed in to change notification settings - Fork 1
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
implement textDocument/completion
in editor API
#3
Comments
textDocument/completion
textDocument/completion
in editor API
@aitor-gomila I've assigned this to you because it's necessary and simple enough to implement, so it should help you understand the codebase. |
I've already implemented the data types for this API. You just need to add logic in the Editor class for receiving completions. We don't currently use progress tokens so don't worry about that. |
Another thing to remember: notifications result in signal events being dispatched to the editor, while requests must be asynchronous methods that return the server's result. |
How do I implement this? |
@aitor-gomila broadly, add a method to the public async CompletionItem[]? completion_async(Uri uri, Position position,
CompletionTriggerKind = CompletionTriggerKind.UNSET) {
// ...
} These types come from the API I linked in the first comment. Feel free to ask me more questions, but try to read the API I linked and look at the surrounding code to get an understanding on your own. I'm not sure your level of experience. I don't want to overwhelm you, so if you want we could do live coding in the Vala discord. |
Hi! Sorry for not answering. I have been busy with other stuff lately. I will start working on this issue soon. Do you have discord/telegram/whatever so we can communicate more fluently? I think it's a good practice to use GitHub issues for most important things, but maybe for questions it's best to use something else :) |
No problem. Work at your own pace. And yes, the Vala discord is linked in that comment. |
API: https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#textDocument_completion
The text was updated successfully, but these errors were encountered: