pappasam / jedi-language-server

A Python language server exclusively for Jedi. If Jedi supports it well, this language server should too.
MIT License
596 stars 45 forks source link

[Newbie] Completions for external modules #247

Closed romz987 closed 1 year ago

romz987 commented 1 year ago

Hello! NVIM v0.8.1 Python 3.10.8 Using nvim-lspconfig

Installed external module with "pip3 install" and have no completions :( I tryed to add extraPathes to lspconfig.lua:

lspconfig.jedi_language_server.setup{
    init_options = {
        workspace = {
            extraPaths = {'/home/user/.local/lib/python3.10/'}
        }
    }
}

And it doesn't work for me :( I would be happy if can help me resolve this problem!

Thank you

romz987 commented 1 year ago

Solved by setting "true" to "include-system-site-packages" string in ~/.local/share/nvim/mason/packages/python-lsp-server/venv/pyvenv.cfg file.

jofr-well commented 1 year ago

Solved by setting "true" to "include-system-site-packages" string in ~/.local/share/nvim/mason/packages/python-lsp-server/venv/pyvenv.cfg file.

This solved the issue for me too, except the package path was /jedi-language-server/venv/pyvenv.cfg