2022-02-03 22:24:23 -06:00
|
|
|
local internal = require("nvim-ts-autotag.internal")
|
2021-03-10 00:09:41 -06:00
|
|
|
|
|
|
|
local M = {}
|
|
|
|
|
2024-05-19 07:02:34 -05:00
|
|
|
---@deprecated
|
|
|
|
---Will be removed in 1.0.0
|
2021-03-10 00:09:41 -06:00
|
|
|
function M.init()
|
2024-05-19 07:02:34 -05:00
|
|
|
local _, nvim_ts = pcall(require, "nvim-treesitter")
|
|
|
|
if not nvim_ts then
|
|
|
|
return
|
|
|
|
end
|
2024-06-19 15:00:25 -05:00
|
|
|
if nvim_ts.define_modules == nil then
|
|
|
|
return
|
|
|
|
end
|
2024-05-19 07:02:34 -05:00
|
|
|
nvim_ts.define_modules({
|
|
|
|
autotag = {
|
2024-05-15 08:07:00 -05:00
|
|
|
attach = function(bufnr, _)
|
2024-05-19 07:02:34 -05:00
|
|
|
vim.deprecate(
|
|
|
|
"Nvim Treesitter Setup",
|
|
|
|
"`require('nvim-ts-autotag').setup()`",
|
|
|
|
"1.0.0",
|
|
|
|
"nvim-ts-autotag",
|
|
|
|
true
|
|
|
|
)
|
2024-05-15 08:07:00 -05:00
|
|
|
internal.attach(bufnr)
|
2024-05-19 07:02:34 -05:00
|
|
|
end,
|
|
|
|
detach = function(bufnr)
|
|
|
|
internal.detach(bufnr)
|
|
|
|
end,
|
|
|
|
is_supported = function(lang)
|
|
|
|
return internal.is_supported(lang)
|
|
|
|
end,
|
|
|
|
},
|
2024-05-18 08:18:45 -05:00
|
|
|
})
|
2021-03-10 00:09:41 -06:00
|
|
|
end
|
|
|
|
|
2024-05-15 08:07:00 -05:00
|
|
|
M.setup = require("nvim-ts-autotag.config.plugin").setup
|
2021-03-10 00:09:41 -06:00
|
|
|
|
|
|
|
return M
|