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? #967

Open
jiajiawei opened this issue Mar 24, 2023 · 1 comment
Open

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

jiajiawei opened this issue Mar 24, 2023 · 1 comment

Comments

@jiajiawei
Copy link

jiajiawei commented Mar 24, 2023

I feel very much that your project is exactly what I need Then I have another function that I don't know how to implement Would you please take a look at it when you are free

I want to implement some built-in class, function, and variable into the editor, which need to be dynamically injected and may change frequently And there is no implementation, only a declaration

What I can think of is using .pyi files to do this But I don't know how to inject my customized file into pyls / jedi

ex: ide.pyi

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

When I write the following code, both the Person on the first line and the Study on the second line can be automatically prompted

from ide import *            # It would be even better if we didn't add this line
p = Person()
p.study()
@jiajiawei
Copy link
Author

I found a problem in Config.settings

I can use the method shown in the figure below to pass' initializationOptions' to 'Config. _init_opts', but I cannot find a reference to ' _init_opts'."

image

Later, I successfully used the method shown in the figure below directly But I don't know how to make the configuration path dynamic

image

You can refer to Monaco-python-lsp for testing

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