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

PyRight LSP #598

Open
Hugo-Persson opened this issue Apr 11, 2024 · 9 comments
Open

PyRight LSP #598

Hugo-Persson opened this issue Apr 11, 2024 · 9 comments

Comments

@Hugo-Persson
Copy link

Foremost, I love this project. Really great work!

Is there any way to make pyright recognize the variables provided? I currently get a lot of annoying errors from my LSP. It would be really nice to not get errors and get completions.

For example:
image

@ALERTua
Copy link
Contributor

ALERTua commented Apr 11, 2024

Here's the cure for you: https://github.com/dmamelin/pyscript_autocomplete

@Hugo-Persson
Copy link
Author

Thank you, I am going to try this!

@Hugo-Persson
Copy link
Author

@ALERTua what is meant by this step?
Copy the apps/pyscript_autocomplete folder to your PyScript directory.

Where is the apps folder?

@ALERTua
Copy link
Contributor

ALERTua commented Apr 11, 2024

apps = /config/pyscript/apps

@Hugo-Persson
Copy link
Author

@ALERTua I do not have this folder, I only have my scripts under config/pyscript/

My config looks like this:

pyscript:
  allow_all_imports: true
  hass_is_global: true
  apps:
    pyscript_autocomplete:

@ALERTua
Copy link
Contributor

ALERTua commented Apr 11, 2024

then create it.

@Hugo-Persson
Copy link
Author

But what should be copied:

Copy the apps/pyscript_autocomplete folder to your PyScript directory.

@Hugo-Persson
Copy link
Author

I also do not have the service pyscript.autocomplete_generator service.

@Hugo-Persson
Copy link
Author

Omg I am stupid, the files are in the repo

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

2 participants