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

nvim autotag Don't work #96

Open
jinman0826 opened this issue Oct 1, 2024 · 2 comments
Open

nvim autotag Don't work #96

jinman0826 opened this issue Oct 1, 2024 · 2 comments

Comments

@jinman0826
Copy link

image
@TimmyByDay
Copy link

nvim-ts-autotag has cautioned in their README:
"If you are setting up via nvim-treesitter.configs it has been deprecated! Please migrate to the new way. It will be removed in 1.0.0."

Check README for the new way.
Specific issue thread.

@anmolsekhon590
Copy link

I have added file:
lua/<my username>/plugins/nvim-ts-autotag.lua

return {
  "windwp/nvim-ts-autotag",
  config = function()
    local autotag = require("nvim-ts-autotag")

    autotag.setup({
      opts = {
        -- Defaults
        enable_close = true, -- Auto close tags
        enable_rename = true, -- Auto rename pairs of tags
        enable_close_on_slash = false -- Auto close on trailing </
      },
      -- Also override individual filetype configs, these take priority.
      -- Empty by default, useful if one of the "opts" global settings
      -- doesn't work well in a specific filetype
      
      -- per_filetype = {
      -- ["html"] = {
      --    enable_close = false
      --  }
      -- }
    })
  end,
}

and updated lua/<my username>/plugins/treesitter.lua by removing these 3 lines:

  autotag = {
    enable = true,
  },

I would've sent a PR but looks like all the recent PRs were not merged.

Highly recommend you checking the official nvim-ts-autotag repo for your reference:
https://github.com/windwp/nvim-ts-autotag

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

3 participants