refactor: private did_setup opt in Setup

This commit is contained in:
Price Hiller 2024-05-17 23:03:35 -05:00 committed by windwp
parent 973f223d9c
commit f489945bdd
2 changed files with 3 additions and 1 deletions

View File

@ -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 = {

View File

@ -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