forked from windwp/nvim-ts-autotag
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnvim-ts-autotag.lua
39 lines (35 loc) · 983 Bytes
/
nvim-ts-autotag.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
local internal = require("nvim-ts-autotag.internal")
local M = {}
---@deprecated
---Will be removed in 1.0.0
function M.init()
local _, nvim_ts = pcall(require, "nvim-treesitter")
if not nvim_ts then
return
end
if nvim_ts.define_modules == nil then
return
end
nvim_ts.define_modules({
autotag = {
attach = function(bufnr, _)
vim.deprecate(
"Nvim Treesitter Setup",
"`require('nvim-ts-autotag').setup()`",
"1.0.0",
"nvim-ts-autotag",
true
)
internal.attach(bufnr)
end,
detach = function(bufnr)
internal.detach(bufnr)
end,
is_supported = function(lang)
return internal.is_supported(lang)
end,
},
})
end
M.setup = require("nvim-ts-autotag.config.plugin").setup
return M