Closed andrewdoh closed 6 months ago
I have the same problem. Tracked it down to lsp-pyright
including the home folder, which causes pyright to scan everything in home and inevitably run out of memory.
LSP :: pyright:87121 initialized successfully in folders: (/Users/USERNAME /Volumes/projects/PROJECTFOLDER)
My quickfix right now is to create a pyrightconfig.json
in the home folder with the following contents:
{
"exclude": ["**"]
}
I'm not sure why the home folder is added at all, but other lsp
clients (e.g., lsp-clangd
) don't do this, so I'm inclined to blame lsp-pyright
or pyright
itself.
Hey guys, try the pyright
cli directly and you can get the direction.
Just running pyright
in the project directory, it seems to scan only the project itself. I rolled back lsp-{mode,ui,pyright}
to versions when I didn't have the problem, and the error persists. Not sure what else to check right now. I'm using Spacemacs, maybe it's some other side effect.
There are too many files and directories in HOME folder obviously. This case should be avoided.
I have the same problem. Tracked it down to
lsp-pyright
including the home folder, which causes pyright to scan everything in home and inevitably run out of memory.LSP :: pyright:87121 initialized successfully in folders: (/Users/USERNAME /Volumes/projects/PROJECTFOLDER)
My quickfix right now is to create a
pyrightconfig.json
in the home folder with the following contents:{ "exclude": ["**"] }
I'm not sure why the home folder is added at all, but other
lsp
clients (e.g.,lsp-clangd
) don't do this, so I'm inclined to blamelsp-pyright
orpyright
itself.
thanks for the tip this helped alot. im not sure why my home folder was initially being included either but emacs prompted me to choose the root dir this time so i was able to not have to exclude any directories.
So I am closing it...
im not sure whats going on any help would be appreciated. im using a m2 mba on sonoma. message buffer returns the following:
LSP :: Connected to [pyright:55758/starting /Users/andrew][ruff-lsp:55759/starting /Users/andrew]. LSP :: pyright:55758 initialized successfully in folders: (/Users/andrew) LSP :: ruff-lsp:55759 initialized successfully in folders: (/Users/andrew) LSP :: pyright has exited (abort trap: 6)