Giter Site home page Giter Site logo

Create a LSP server for Ante about ante HOT 3 OPEN

jfecher avatar jfecher commented on June 29, 2024
Create a LSP server for Ante

from ante.

Comments (3)

ehllie avatar ehllie commented on June 29, 2024

Should that be done inside this repository as a separate workspace, or would you prefer having the language server in a separate repository completely? In terms of implementing the language server, I think using tower-lsp and the tower-lsp-boilerplate should offer the quickest way to get a functional language server. Are you ok with using a library like that to abstract the lower levels of the language server protocol?

from ante.

jfecher avatar jfecher commented on June 29, 2024

@ehllie I think a separate repository might be best. I'm absolutely in favor of using any libraries for the LSP to make things easier. You can take a look at https://github.com/jfecher/ante-lsp for a possible good starting point (and place to merge things into). It uses tower-lsp and was forked from the boilerplate repo. I haven't looked at it in a while though so I doubt it's in a working state.

from ante.

ehllie avatar ehllie commented on June 29, 2024

I've noticed a couple things that would need to be done for the language server to be effective:

  • Make name resolution and type checking steps produce a list of errors, warnings and notes rather than printing them directly to stderr or panicking.
  • Make the AST not require a lifetime parameter. The lifetime of AST being tied to the lifetime of the Path reference makes it awkward to work with in a language server context, since the filename is created from the request, which only lives inside the body of a function that receives it. If we want the AST to live longer in the cache it needs to take ownership of the path.
  • Fix the unsafe impl Send for ... lines? They are marked with a comment saying TODO: Remove, and it's usually not the best idea to lie to the compiler 😛. Not sure how much of an issue it could be though.

from ante.

Related Issues (20)

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.