-
Notifications
You must be signed in to change notification settings - Fork 25
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
Add support for excluding paths #46
Comments
Okay I have faced the similar problem and the cause of the problem is lsp-file-watcher. You can reduce the startup time by simply putting The related elisp in my init file to achieve this:
My sample pyrightconfig.json file
|
Awesome, thank you for that. I'll give it a try 😄 |
Thanks for the snippet! solved my issue 😄 |
If a venv is located inside a project directory then it can cause a long startup time for pyright due to it analyzing all of the contents of the third party packages. The configuration documentation for pyright shows that there is support for an
exclude
option to specify paths that should not be scanned for type information unless imports are made that trigger it. https://github.com/microsoft/pyright/blob/master/docs/configuration.mdLooking at the code for lsp-pyright it seems that it should be possible to expose a variable that gets added to
lsp-register-custom-settings
to manage that setting. https://github.com/emacs-lsp/lsp-pyright/blob/master/lsp-pyright.el#L199-L213The text was updated successfully, but these errors were encountered: