Skip to content
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

How to implement custom completion items through pyi scripts? #22

Open
jiajiawei opened this issue Mar 23, 2023 · 0 comments
Open

How to implement custom completion items through pyi scripts? #22

jiajiawei opened this issue Mar 23, 2023 · 0 comments

Comments

@jiajiawei
Copy link

非常感觉您的项目, 正是我需要的. 然后我还有另外一项功能, 不知道该怎么实现了. 您有空帮忙看看.

我想实现内置一些class, function, variable到编辑器中, 这些都需要是动态注入的,可能经常变化. 而且没有实现,只有声明.

我能想到的是使用 .pyi 文件来做这件事. 但是不知道该怎么把我自定义的文件注入到pyls/lsp/jedi

ex: ide.pyi

class Person:
    def study(self) -> None: ...
    def play(self) -> None: ...

当我写如下代码时, 第一行的Person, 第二行的study 都能够自动提示出来

p = Person()
p.study()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant