Skip to content

Using Python LSP instead of own server #33

Description

@zuhanit

Summary

epScript is based on eudplib, the python library, so it's code will be interpreted to python code. Then we can use Python LSP to epScript.

How we can achieve it?

First, we need to interpret epScript code to python code by Interpreter.

Since two languages has different syntax input and output is different. It means the position (character and line) is different too, therefore we have to adjust this. Recognizer is the class to adjust epScript and python code.

Once the python code is generated, Another LSP, python lsp, will process entire language features like completion, signature help and etc.

Python Language Server will send messages, epScript Language Server takes them and process those things using Recognizer.

Benefit

  • Can support language features more accurately.
  • Can support more language features more than write self.

Python Language Server candidates

  • Pyright
    • Pyright is static type checker management by Microsoft. Pylance using it.
    • TypeScript
  • Jedi
    • Jedi is an fully open source(Pylance is closed source on the other hand) analysis tool.
    • Python

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions