Skip to content
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

Invalid buffer id - Adding and editing #81

Open
rhysmaiden opened this issue May 11, 2024 · 0 comments
Open

Invalid buffer id - Adding and editing #81

rhysmaiden opened this issue May 11, 2024 · 0 comments

Comments

@rhysmaiden
Copy link

Lazy config:

return {
  'MunifTanjim/nui.nvim',
  {
    'arnarg/todotxt.nvim',
    dependencies = {'MunifTanjim/nui.nvim'},
    config = function()
      local todo = require("todotxt-nvim")
      todo.setup({
        todo_file = "~/Documents/todo.txt",
        sidebar = {
          width = 40,
          position = "right", -- default: "right"
        },
        capture = {
          prompt = "> ",
          -- Percentage is percentage of width of the whole editor
          -- Integer is number of columns
          width = "50%",
          position = "50%",
          -- Styled after https://swiftodoapp.com/todotxt-syntax/priority/
          -- With this, if you include any of the below keywords it will
          -- automatically use the associated priority and remove that
          -- keyword from the final task.
          alternative_priority = {
            A = "now",
            B = "next",
            C = "today",
            D = "this week",
            E = "next week",
          },
        },
        -- Highlights used in both capture prompt and tasks sidebar
        -- Each highlight type can be a table with 'fg', 'bg' and 'style'
        -- options or a string referencing an existing highlight group.
        -- highlights = {
        --   project = "Identifier",
        -- }
        highlights = {
          project = {
            fg = "magenta",
            bg = "NONE",
            style = "NONE",
          },
          context = {
            fg = "cyan",
            bg = "NONE",
            style = "NONE",
          },
          date = {
            fg = "NONE",
            bg = "NONE",
            style = "underline",
          },
          done_task = {
            fg = "gray",
            bg = "NONE",
            style = "NONE",
          },
          priorities = {
            A = {
              fg = "red",
              bg = "NONE",
              style = "bold",
            },
            B = {
              fg = "magenta",
              bg = "NONE",
              style = "bold",
            },
            C = {
              fg = "yellow",
              bg = "NONE",
              style = "bold",
            },
            D = {
              fg = "cyan",
              bg = "NONE",
              style = "bold",
            },
          },
        },
        -- Keymap used in sidebar split
        keymap = {
          quit = "q",
          toggle_metadata = "m",
          delete_task = "dd",
          complete_task = "n",
          edit_task = "cc",
        },
      })
      vim.keymap.set("n", "<leader>t", ":ToDoTxtTasksToggle<CR>")
      vim.keymap.set("n", "<leader>a", ":ToDoTxtCapture<CR>")
    end,

  },
}

Error message:

E5108: Error executing lua ...n/.local/share/nvim/lazy/nui.nvim/lua/nui/popup/init.lua:214: Invalid buffer id: 13
stack traceback:
        [C]: in function 'create'
        ...n/.local/share/nvim/lazy/nui.nvim/lua/nui/popup/init.lua:214: in function 'mount'
        ...n/.local/share/nvim/lazy/nui.nvim/lua/nui/input/init.lua:80: in function 'mount'
        ...l/share/nvim/lazy/todotxt.nvim/lua/todotxt-nvim/init.lua:211: in function 'capture'
        [string ":lua"]:1: in main chunk

Reproducable steps:

  1. :ToDoTxtCapture
  2. Type in task and hit enter
  3. :ToDoTxtCapture
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant