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

LSP autocomplete not working in python #125

Open
mixtli opened this issue Aug 29, 2024 · 1 comment
Open

LSP autocomplete not working in python #125

mixtli opened this issue Aug 29, 2024 · 1 comment

Comments

@mixtli
Copy link

mixtli commented Aug 29, 2024

For some reason, whenever I open a normal python project, LSP autocomplete works fine. For example, if I type:

foo = []
foo.

I see all the standard list methods from LSP in addition to my snippets, etc.

But when running nvim leetcode.nvim, autocomplete only shows snippets.

LspInfo shows that pyright is attached.

I do see this over and over in the Lsp log:
[ERROR][2024-08-29 15:14:55] ...lsp/handlers.lua:623 'File or directory "/" does not exist.'

Any idea why this might be?

@mixtli
Copy link
Author

mixtli commented Aug 29, 2024

So, I solved this by finding the leetcode state dir and running:
touch pyrightconfig.json.

It seems initializing the directory as a git repo also works.

I'm not sure how to make this automatic.. But I think a lot of things depend on the root being a git repo to work, so maybe the plugin should just initialize the state repo to a git repo if git is installed? Maybe it's outside the scope of this plugin, but I do think it's confusing for users. It took me way too long to figure this out.

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