Skip to content

bug: ipairs argument expects table, not a nil value. #65

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

Closed
akthe-at opened this issue Jul 17, 2024 · 4 comments
Closed

bug: ipairs argument expects table, not a nil value. #65

akthe-at opened this issue Jul 17, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@akthe-at
Copy link
Contributor

Neovim version (nvim -v)

0.10.0

Operating system

Windows

Terminal emulator / GUI

Wezterm

Describe the bug

Attempted to open an obsidian.nvim markdown file of mine and was met with the following error:
Error executing vim.schedule lua callback: ...vim-data/lazy/render-markdown/lua/render-markdown/ui.lua:82: bad argument #1 to 'ipairs' (table expected, got nil) stack traceback: [C]: in function 'ipairs' ...vim-data/lazy/render-markdown/lua/render-markdown/ui.lua:82: in function 'refresh' ...vim-data/lazy/render-markdown/lua/render-markdown/ui.lua:32: in function <...vim-data/lazy/render-markdown/lua/render-markdown/ui.lua:30>

It seems like the new change was not handling an empty table very well. I am not familiar with your code base but I successfully attempted a quick fix. PR Incoming!

Expected behavior

I have opened this file several times this week prior to your two latest commits without any issue or error...I wasn't sure what to expect with the new full conceal behavior but I didn't expect the error.

Healthcheck output (:checkhealth render-markdown)

render-markdown: require("render-markdown.health").check()

markdown.nvim [neovim version] ~

  • OK Version >= 0.10

markdown.nvim [configuration] ~

  • OK valid

markdown.nvim [nvim-treesitter] ~

  • OK installed
  • OK markdown: parser installed
  • OK markdown_inline: parser installed
  • OK latex: parser installed
  • OK highlights enabled

markdown.nvim [executables] ~

  • WARNING latex2text: not installed
    • ADVICE:
      • Disable LaTeX support to avoid this warning by setting { latex = { enabled = false } }

Additional information

No response

@akthe-at akthe-at added the bug Something isn't working label Jul 17, 2024
@tristan-harris
Copy link

Are you using the Telescope plugin by any chance? I am also getting the same error, but only when opening a file with Telescope. Other plugins such as neo-tree as well as plain :e work fine.

@akthe-at
Copy link
Contributor Author

@tristan-harris I have fzf-lua as my main picker but I actually do have telescope installed for a few select plugin interactions...

@MeanderingProgrammer
Copy link
Owner

MeanderingProgrammer commented Jul 17, 2024

Are you using the Telescope plugin by any chance? I am also getting the same error, but only when opening a file with Telescope. Other plugins such as neo-tree as well as plain :e work fine.

Ah, interesting. I know there are various issues related to opening the buffer with Telescope: https://github.com/MeanderingProgrammer/markdown.nvim/blob/main/doc/limitations.md.

Thanks for brining that up!

I believe fzf had some similar issues for changing modes to open the buffer: #36.

I can definitely see the latest changes causing more edge cases related to this. Since after opening the buffer often they'll also move the cursor to the last active position.

@MeanderingProgrammer
Copy link
Owner

Telescope and fzf stuff should work better after last commit

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants