windwp/nvim-ts-autotag

Auto indent

xndrpr opened this issue · 1 comments

Hi. Is it possible to auto indent?

This is what I get:

<div>
|</div>

but I'd like to have this:

<div>
    |
</div>

My config(lazy.nvim):

return {
  {
    "nvim-ts-autotag",
    config = function()
      require("nvim-ts-autotag").setup {
        opts = {
          enable_close = true,
          enable_rename = true,
          enable_close_on_slash = false,
        },
       per_filetype = {
          ["html"] = {
            enable_close = false,
          },
        },
      }
    end,
  },
  {
    "nvim-t reesitter/nvim-treesitter",
    build = ":TSUpdate",
    config = function()
      local configs = require "nvim-treesitter.configs"

      configs.setup {
        auto_install = true,
        sync_install = false,
        highlight = {
          enable = true,
        },
        indent = {
          enable = true,
        },
      }
    end,
  },
}

Just found a solution:

  {
    "windwp/nvim-autopairs",
    event = "InsertEnter",
    config = true,
  },
 

duplicate of #24