windwp / nvim-ts-autotag

Use treesitter to auto close and auto rename html tag
MIT License
1.69k stars 90 forks source link

Error running config for nvim-ts-autotag: [string "..."]:0: loop or previous error loading module 'nvim-ts-autotag' #33

Closed nyngwang closed 3 years ago

nyngwang commented 3 years ago

As title, I'm using Packer.nvim and I got error:

Error running config for nvim-ts-autotag: [string "..."]:0: loop or previous error loading module 'nvim-ts-autotag'
windwp commented 3 years ago

check read me it need treesitter loading first

nyngwang commented 3 years ago

Thanks! Exactly what you said.

issadarkthing commented 2 years ago

How to ensure the treesitter loading first?

nyngwang commented 2 years ago

@issadarkthing: Try packer.nvim requires~

issadarkthing commented 2 years ago

It doesn't work. This is my current setup for nvim-ts-autotag

  use { 
    'windwp/nvim-ts-autotag', 
    opt = true, 
    ft = 'typescriptreact', 
    requires = {{'nvim-treesitter/nvim-treesitter'}},
    config = function() require('nvim-ts-autotag').setup() end,
  }
nyngwang commented 2 years ago

@issadarkthing: I was busying clean out issues. Then you can try mine, which has to work :)

  use {
    'windwp/nvim-ts-autotag',
    branch = 'main',
    requires = {
      'nvim-treesitter/nvim-treesitter',
    },
    config = function ()
      require('nvim-ts-autotag').setup()
    end
  }

If you still have problem try delete rm -rf ~/.local/share/nvim/site/pack/packer/start/ and then install all your plugins again.

issadarkthing commented 2 years ago

The error is gone now but it still doesn't auto-complete

nyngwang commented 2 years ago

@issadarkthing: I think the problem is on 'nvim-treesitter/nvim-treesitter'. You will need to add a standalone use { ... } for 'nvim-treesitter/nvim-treesitter'. I can provide you with my config later.

issadarkthing commented 2 years ago

Alright sure