You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Firstly thank you to all the maintainers and particularly hrsh7th for all your hard work. Much appreciated.
I discovered today that when using nvim-cmp with pylsp to write Python, scrolling through certain completion options will result in the error stack below. It looks like perhaps some completion options have associated markdown documentation, and its stylization during rendering is failing. I have attached a screenshot of this happening with the minimal config above.
Error executing vim.schedule lua callback: /usr/share/nvim/runtime/lua/vim/lsp/util.lua:1409: attempt to index a
nil value
stack traceback:
/usr/share/nvim/runtime/lua/vim/lsp/util.lua:1409: in function 'stylize_markdown'
/tmp/plugged/vim-plug/nvim-cmp/lua/cmp/view/docs_view.lua:64: in function 'open'
/tmp/plugged/vim-plug/nvim-cmp/lua/cmp/view.lua:292: in function 'callback'
/tmp/plugged/vim-plug/nvim-cmp/lua/cmp/utils/async.lua:138: in function ''
vim/_editor.lua: in function <vim/_editor.lua:0>
Steps to reproduce
Ensure the language server pylsp is installed (I installed via dnf on Fedora, you can also install via mason.nvim, pip, conda, or I think also homebrew) (I used pylsp v1.11.0)
Create minimal Python environment (I used python3.11 on Fedora when reproducing issue)
Install Pandas (For me it was pandas==2.2.2)
Activate environment
Open a new python file (e.g. test.py) with nvim using minimal config
Write the following in the file:
importpandasaspdx=pd.r
Wait until completion options appear, then cycle through options (see screenshot above)
At some point, the error shown above in the screenshot will appear
Expected behavior
I should be able to cycle through completion options without any errors, and any associated documentation with completion options should be rendered properly.
Actual behavior
At certain completion options, the rendering of the associated documentation fails (or at least this is what it looks like).
Additional context
Interestingly I can only reproduce with completions using the pandas package. I have tried cycling through some random completion options on other similar packages with long docstrings like numpy and torch, but so far they seem okay.
The text was updated successfully, but these errors were encountered:
FAQ
Announcement
Minimal reproducible full config
Description
Firstly thank you to all the maintainers and particularly hrsh7th for all your hard work. Much appreciated.
I discovered today that when using
nvim-cmp
withpylsp
to write Python, scrolling through certain completion options will result in the error stack below. It looks like perhaps some completion options have associated markdown documentation, and its stylization during rendering is failing. I have attached a screenshot of this happening with the minimal config above.Steps to reproduce
pylsp
is installed (I installed viadnf
on Fedora, you can also install viamason.nvim
,pip
,conda
, or I think alsohomebrew
) (I usedpylsp v1.11.0
)python3.11
on Fedora when reproducing issue)pandas==2.2.2
)test.py
) with nvim using minimal configExpected behavior
I should be able to cycle through completion options without any errors, and any associated documentation with completion options should be rendered properly.
Actual behavior
At certain completion options, the rendering of the associated documentation fails (or at least this is what it looks like).
Additional context
Interestingly I can only reproduce with completions using the
pandas
package. I have tried cycling through some random completion options on other similar packages with long docstrings likenumpy
andtorch
, but so far they seem okay.The text was updated successfully, but these errors were encountered: