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

Errror - attempt to call field 'iter' #1

Open
sfragis opened this issue Nov 18, 2023 · 1 comment
Open

Errror - attempt to call field 'iter' #1

sfragis opened this issue Nov 18, 2023 · 1 comment

Comments

@sfragis
Copy link

sfragis commented Nov 18, 2023

Hi, I wanted to give your plugin a try but experienced an issue. I'm quite new to nvim so I might have written something wrong.

I'm using lazy.nvim and this is the relevant config:

{
  'doums/tenaille.nvim',
  config = function() 
    require('tenaille').setup()
  end
}

Whenever I select some text and type <Leader>" I get this error:

E5108: Error executing lua: .../share/nvim/lazy/tenaille.nvim/lua/tenaille/tenaille.lua:37: attempt to call field 'iter' (a nil value)
stack traceback:
        .../share/nvim/lazy/tenaille.nvim/lua/tenaille/tenaille.lua:37: in function 'get_selection'
        .../share/nvim/lazy/tenaille.nvim/lua/tenaille/tenaille.lua:177: in function 'wrap'
        .../share/nvim/lazy/tenaille.nvim/lua/tenaille/tenaille.lua:222: in function <.../share/nvim/lazy/tenaille.nvim/lua/tenaille/tenaille.lua:221>

I'm using nvim 0.9.4.

@dnylvssr
Copy link

dnylvssr commented Feb 25, 2024

I get the exact same error message using nvim 0.9.5-2 and using the lazy plugin manager.

details of my tenaille.lua file, basicly the readme.md config

return {
  "doums/tenaille.nvim",

  config = function()
    local tenaille = require("tenaille")

    -- Default config
    tenaille.setup({
      -- generate default mapping for each pair using
      -- <leader>_open-character_
      -- i.e.
      -- <leader>" for double quotes ""
      -- <leader>[ for brackets []
      -- <leader>{ for curly braces {} and so on...
      default_mapping = true,
      -- supported brackets and quotes pairs
      -- ⚠ only 2 character pairs are supported
      pairs = {
        { '"', '"' },
        { "'", "'" },
        { "`", "`" },
        { "{", "}" },
        { "[", "]" },
        { "(", ")" },
        { "<", ">" },
      },
    })
  end,
}

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

2 participants