mirror of
https://github.com/windwp/nvim-ts-autotag.git
synced 2024-12-28 21:19:16 -06:00
refactor: private did_setup
opt in Setup
This commit is contained in:
parent
973f223d9c
commit
f489945bdd
@ -112,7 +112,8 @@ local Opts = {
|
||||
}
|
||||
|
||||
---@class nvim-ts-autotag.PluginSetup
|
||||
---@field opts nvim-ts-autotag.Opts?
|
||||
---@field private did_setup boolean
|
||||
---@field opts nvim-ts-autotag.Opts? General setup optionss
|
||||
---@field aliases { [string]: string }? Aliases a filetype to an existing filetype tag config
|
||||
---@field per_filetype { [string]: nvim-ts-autotag.Opts }? Per filetype config overrides
|
||||
local Setup = {
|
||||
|
@ -442,6 +442,7 @@ end
|
||||
|
||||
M.attach = function(bufnr)
|
||||
bufnr = bufnr or vim.api.nvim_get_current_buf()
|
||||
---@diagnostic disable-next-line: invisible
|
||||
if not Setup.did_setup then
|
||||
local _, ts_configs = pcall(require, "nvim-treesitter.configs")
|
||||
if not ts_configs then
|
||||
|
Loading…
Reference in New Issue
Block a user