Open Dissonant-Tech opened 4 years ago
What version (commit hash) of coc-python
are you using?
0bbda6e
), the jumping to/from modules inside of the project doesn't work. I got the same error Definition provider not found for current document
3e03f98
)@zachliu Just tried with both tags 1.2.9 and 1.2.7 (Jan 15th build) and both still have the same issue. Also I tried with Jedi and it works fine.
right, forgot to mention i'm using jedi
, but jedi
+1.2.9
doesn't work on my computer :joy:
Hi everyone, I've experienced the same issue here.
After a few hours checking the configuration and trying several things, I've found:
According to the last issue, the files outside the workspace are not sent to the MPLS after the Multi-root workspace support was added. See the description for a good and detailed explanation :rocket:. It's likely the same issue is affecting to coc-nvim and coc-python extension someway.
Today, I also experienced an issue with coc-nvim and the workspaces. It was detecting the root workspace (CocList folders
) at the repository root instead of the CWD where I'd placed the .vim/coc-settings.json
file. This was making everything fail. The solution was to add .vim
folder to the coc.preferences.rootPatterns
(never used before). Final value: "coc.preferences.rootPatterns": [".vim", ".git", ".hg", ".projections.json"]
Hi, the issue should be fixed in the 0.5.37 version of Python Language Server :tada: (changing parameter configuration). Here's the comment
I have configured the coc-nvim
to use the daily MPLS release and the new feature:
"python.analysis.downloadChannel": "daily",
"python.analysis.memory.keepLibraryAst": true,
After updating the coc-nvim (:CocUpdate
) and the LS (automatic after restart?), the feature does not work and it is still complaining about the keepLibraryAst
option:
[undefined] [W] Property python.analysis.memory.keepLibraryAst is not allowed.
I've checked out the repository and seen this option isn't listed in the package.json
. I don't know if the solution is as simple as adding it to the options list and updating the languageServerVersion
(package.json
file), or there's something else to be done :thinking:.
Anyway, I suppose coc-python
only updates its languageServerVersion
to the latest stable
after checking that all the new options are well integrated. In this case, we must wait for (1) MPLS to include this feature in the stable
version, and (2) coc-python
to update the integration.
@emarbo What is the version of python language server you are using? (e.g. :CocInfo
, ~/.config/coc/extensions/coc-python-data/
)
Did you run :CocCommand python.upgradePythonLanguageServer
? With the daily channel being used, I can download languageServer.0.5.45
.
Hi @wookayin, I can download the same version as you, though I think the problem is in the extension.
As far as I understand, the coc-python
is to Neovim as the vscode-python
is to VSCode, and both extensions use the same language server: MPLS. Although we update the LS to the latest version, if the extension (coc-python
or vscode-python
) doesn't send the parameter to the LS it won't work.
That's what I think but I could be completely wrong. Does the feature work for you? I mean, can you use the go to declaration
inside the virtualenv?
I didn't go deep into the extension code but I suppose the option must be declared in the package.json to be sent to the LS. Look at the package.json
of both extensions:
release-2020.03
: declaredHi, I have the same problem.
Hi all, I added to the package.json and it seems to be working for me using virtualenv and MPLS. Can one of u test using my pr, please? PR is here
When calling using jump to definition inside of a file in any of the site-packages directories I get:
Definition provider not found for current document
.Jumping to/from modules inside of the project works fine, but once I go to any definition outside of the project I get the above error.
The following MPLS output shows the request and response for the initial jump that sends me into the Django site-packages, following requests are not sent to the MPLS server at all and just result in
Definition provider not found for current document