GithubHelp home page GithubHelp logo

Comments (7)

Prince781 avatar Prince781 commented on September 25, 2024

@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.

from lsp-glib.

Prince781 avatar Prince781 commented on September 25, 2024

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.

from lsp-glib.

Prince781 avatar Prince781 commented on September 25, 2024

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. textDocument/completion is a request.

from lsp-glib.

 avatar commented on September 25, 2024

How do I implement this?

from lsp-glib.

Prince781 avatar Prince781 commented on September 25, 2024

@aitor-gomila broadly, add a method to the Editor class that allows you to request completion items for a certain document at a certain position. Here's what the signature should probably look like:

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.

from lsp-glib.

 avatar commented on September 25, 2024

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 :)

from lsp-glib.

Prince781 avatar Prince781 commented on September 25, 2024

No problem. Work at your own pace. And yes, the Vala discord is linked in that comment.

from lsp-glib.

Related Issues (1)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.