Al0den / notion.nvim

Notion API wrapper for Neovim
MIT License
67 stars 4 forks source link

Cannot edit notion's page. #14

Closed nekowasabi closed 5 months ago

nekowasabi commented 5 months ago

Describe the bug When I try to open a page from telescope by typing 'e' to edit a Notion page, I get the following error

Error executing luv callback:
....config/nvim/plugged/notion.nvim/lua/notion/markdown.lua:209: bad argument #1 to 'ipairs' (table expected, got nil)
stack traceback:
        [C]: in function 'ipairs'
        ....config/nvim/plugged/notion.nvim/lua/notion/markdown.lua:209: in function 'parseBlocks'
        ....config/nvim/plugged/notion.nvim/lua/notion/markdown.lua:240: in function 'parseBlocks'
        ....config/nvim/plugged/notion.nvim/lua/notion/markdown.lua:246: in function 'callback'
        .../.config/nvim/plugged/notion.nvim/lua/notion/request.lua:93: in function '_user_on_exit'
        ...ts/.config/nvim/plugged/plenary.nvim/lua/plenary/job.lua:240: in function '_shutdown'
        ...ts/.config/nvim/plugged/plenary.nvim/lua/plenary/job.lua:47: in function <...ts/.config/nvim/plugged/plenary.nvim/lua/plenary/job.lua:38>

To Reproduce Steps to reproduce the behavior:

  1. Open nvim
  2. execute :Notion menu
  3. Select page
  4. Type 'e'

Expected behavior Open notion's page in neovim. And enable edit page.

Screenshots

image image

Desktop (please complete the following information):

Al0den commented 5 months ago

Should be fixed, re-open if not

nekowasabi commented 5 months ago

@Al0den Thank you. I checked the operation and got the following error message.

An error occurred during the execution of a Lua callback: vim/_init_packages.lua:0: ....config/nvim/plugged/notion.nvim/lua/notion/markdown.lua:211: 'then' expected near '=
'
stack traceback:
        [C]: in function 'error'
        vim/_init_packages.lua: in function <vim/_init_packages.lua:0>
        [C]: in function 'require'
        ...ts/.config/nvim/plugged/notion.nvim/lua/notion/parse.lua:2: in main chunk
        [C]: in function 'require'
        ...config/nvim/plugged/notion.nvim/lua/notion/telescope.lua:8: in main chunk
        [C]: in function 'require'
        ...ets/.config/nvim/plugged/notion.nvim/lua/notion/init.lua:135: in function <...ets/.config/nvim/plugged/notion.nvim/lua/notion/init.lua:127>
Al0den commented 5 months ago

Weird, didn't touch this bit and runs fine on my side. I'll take a look in the afternoon

Al0den commented 5 months ago

My bad on that one, was running a fixed version locally and didnt see I missed a =. Should be fixed!

nekowasabi commented 5 months ago

@Al0den It working. Thank you!!