-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Description
Summary
Right now all Language Servers for Python are external to Python interpreter itself. What it takes to implement Language Server directly in RustPython binary?
Detailed Explanation
I was looking for a single binary that could work with https://github.com/autozimu/LanguageClient-neovim for Python syntax completion in vim. Something that doesn't require to install a lot of Python dependencies on my system and run unsafe code without isolation/
Drawbacks, Rationale, and Alternatives
I think using RustPython as LSP server is a fun way to try it and extend. Other options include LSP from Microsoft and Palantir. There was the server from Sourcegraph with nice features like no arbitrary code execution.
Unresolved Questions
I do not know which level of isolation from operating system can RustPython provide while indexing Python source. Don't know if it is possible to reuse lexer, parser and other interpreter pieces for Language Server. Maybe refactoring them for reuse will provide better modularity and testing capabilities. In any case it is interesting to know the opinion about the idea.

