mirror of
https://github.com/windwp/nvim-ts-autotag.git
synced 2025-01-24 13:03:54 -06:00
Compare commits
2 Commits
6be773e6e9
...
c2bd871627
Author | SHA1 | Date | |
---|---|---|---|
c2bd871627 | |||
62f606918b |
@ -139,7 +139,7 @@ local Setup = {
|
||||
per_filetype = {},
|
||||
}
|
||||
|
||||
--- Do general plugin setup. Can be called multiple times to override values piecemeal.
|
||||
--- Do general plugin setup
|
||||
---@param opts nvim-ts-autotag.PluginSetup
|
||||
function Setup.setup(opts)
|
||||
if Setup.did_setup then
|
||||
@ -147,8 +147,7 @@ function Setup.setup(opts)
|
||||
end
|
||||
if opts and not opts.opts then
|
||||
vim.notify(
|
||||
"nvim-ts-autotag: Using the legacy setup opts! Please migrate to the new setup options layout as this will eventually have its support removed in 1.0.0!"
|
||||
.. vim.inspect(Setup.did_setup),
|
||||
"nvim-ts-autotag: Using the legacy setup opts! Please migrate to the new setup options layout as this will eventually have its support removed in 1.0.0!",
|
||||
vim.log.levels.WARN
|
||||
)
|
||||
opts = {
|
||||
|
@ -443,7 +443,12 @@ end
|
||||
M.attach = function(bufnr)
|
||||
bufnr = bufnr or vim.api.nvim_get_current_buf()
|
||||
if not Setup.did_setup then
|
||||
local config = require("nvim-treesitter.configs").get_module("autotag")
|
||||
local _, ts_configs = pcall(require, "nvim-treesitter.configs")
|
||||
if not ts_configs then
|
||||
M.setup({ opts = {} })
|
||||
end
|
||||
|
||||
local config = ts_configs.get_module("autotag")
|
||||
Setup.setup(config)
|
||||
end
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user