Open eyalk11 opened 9 months ago
lsprel.log Since 12:40 until ~13:00 It didn't work at all. When I disabled the plugin (rope-autoimport), it suddenly worked (normal completion).
It also seem that it doesn't send the full text I type often.
2023-12-25 12:44:12,290 Jerusalem Standard Time - DEBUG - pylsp.plugins.rope_autoimport - autoimport: searching for word: c
Though hard to be sure.
It's hard for me to understand what the issue here is. Can you Answer the following questions for clarity?
rope_autoimport = {enabled = true, {code_actions = {enabled = true}}}
2 and 3:
For example,
I type DataFrame
, and get no suggestions. (Expect to see from pandas improt DataFrame
).
I type os
and get no suggestions.
In fact, I get no suggestions at all even for same file variables. Unless I disable auto-import. I tried 3 different installations of pylsp with different python versions.
What do you suggest to do?
The log seems to suggest some valid suggestions even as I don't see them.
PS
does it matter that python version that runs pylsp and python3_host are different?
Can you check again with the following setting:
rope_autoimport = {enabled = true, {completions = {enabled = true}}}
Does that work?
No, the entire plugin doesn't work in this case ( except diagnostics).
Maybe it is related?
I allowed both completion and code actions and for a sec it displayed the options.
2024-01-05 08:05:01,829 Jerusalem Standard Time - DEBUG - pylsp.plugins.rope_autoimport - autoimport: searching for word: DataFrame
I typed it at least 10 times, so I wonder why it only appeared once. Then I was able to see code actions for a short while.
Out of desperation I improved the implantation of nvim-pymode to use sqllite db , and probably will include your great scoring method. But your implementation is better. I don't understand how it doesn't work no matter what I do.
Sorry to hear it still doesn’t work. Can you record your screen of the behavior? Everything just works fine on my end …
https://drive.google.com/file/d/1XUNISIc83vcxI0R4CsR-NonNrJzvSP0A/view?usp=sharing
(Trying to add project root doesn't solve it)
@eyalk11 from the video, it seems the LS is broken. E.g. in 0:23, on line 18, it says undefined name 'f'
, which doesn't make sense to me given the content of the line.
Do you get any LSP errors when doing that again?
I think it is related to the autosave , so it remembered a former expression. As you could see, in the second half, it worked really fine. I added the log . No errors. try.log
I have the same issue. When I enable rope_autoimport
completions stop working.
In my case, completions work but I dont see any coming for autoimports. Nor the code actions. I inspected the lsp settings in Mason and saw this:
→ pylsp.plugins.rope_autoimport.code_actions.enabled default: true
→ pylsp.plugins.rope_autoimport.completions.enabled default: true
→ pylsp.plugins.rope_autoimport.enabled default: false
with the following config:
pylsp = {
-- FIXME: does not work
plugins = {
rope_autoimport = { enabled = true, { completions = { enabled = true } } },
},
},
also, from LSP logs:
[ERROR][2024-03-18 14:22:31] .../vim/lsp/rpc.lua:734 "rpc" "/Users/marco/.local/share/nvim/mason/bin/pylsp" "stderr" "2024-03-18 14:22:31,650 -03 - WARNING - pylsp_jsonrpc.endpoint - Received cancel notification for unknown message id 84\n"
I'm having the exact same issue described above. I don't see a bug-report template for this project, so I'll try and give all the context I think is relevant.
python-lsp-server
and deps, plus pylsp-rope
and python-lsp-ruff
, are installed via a dedicated 3.12.5 Python interpreterpython-lsp-server
version 1.12.0pylsp-rope
version 0.1.16python-lsp-ruff
version 2.2.2rope
version 1.13.0jedi
version 0.19.1Relevant Config: config-with-rope.txt (See this repo for my full Helix config)
Here's a sample log file so that you can see that all plugins load successfully.
Step (2) would cause an auto-complete window to show up. Step (3) would cause an auto-complete window to show up that would auto-import the symbol on confirming it.
No auto-complete window shows up.
When rope_autoimport
and rope_completion
are disabled, auto-completion works great, except that there's no auto-import and symbols from installed libraries that haven't been imported into the current file don't show up in the completion list. See config.txt for a sample configuration.
Also, disabling pylsp_rope
doesn't help.
I couldn't get autoimport to work. And when I try to enabled rope_autoimport, suddenly nothing works. It simply doesn't suggest anything (python).
version: 1.9.0
python-lsp-jsonrpc 1.1.2 python-lsp-server 1.9.0
When I did enabled it, I see it found some options But I couldn't see them in the menu.
When I disable rope_autocomplete , it suddenly work (basic completion) .
Do you have an idea why? or direction? Thanks