Closed KMint1819 closed 1 month ago
Alright, this has become enough of a problem that I need to add documentation around this 😅.
So for your case, try adding html
and other languages you want autotag support in to your ensure_installed
section for nvim-treesitter
. You can see how we do this for our test suite: https://github.com/windwp/nvim-ts-autotag/blob/8ae54b90e36ef1fc5267214b30c2cbff71525fe4/tests/minimal_init.lua?plain=1#L64-L78
Alternatively, you can set auto_install = true
for nvim-treesitter
which will install the parsers as needed. Autotag won't/can't work without the associated treesitter parser installed for a given language.
See https://github.com/windwp/nvim-ts-autotag/issues/64#issuecomment-2119580720 for a response to a previous issue of this sort.
I'll keep this issue open and create a PR to update documentation and close it from there.
omg that response was quick :100:
Setting auto_install = true
shows this error:
Nvim Treesitter Setup is deprecated, use `require('nvim-ts-autotag').setup()` instead.
This feature will be removed in nvim-ts-autotag version 1.0.0
but setting ensure_installed
works. Thanks!
Setting auto_install = true shows this error:
Remove these lines from your config.
We no longer use nvim-treesitter
modules.
Use the plain require("nvim-ts-autotag").setup
method.
That was it!!! :tada: :tada:
Sorry to bother with a niche problem but I could never get this plugin working after hours of researching. I'm using
lazy.nvim
+nvim 0.9.5
and AFAIK to enable this plugin I'll have to:Enable autotag in treesitter
lazy.nvim
and setup