fix(trouble_v3): show error only when trouble_v3 is enabled (#2989)

This commit is contained in:
Iordanis Petkakis
2024-04-22 10:48:05 +03:00
committed by GitHub
parent 79fed97f23
commit ceb4855b43

View File

@ -1,14 +1,16 @@
local Config = require("lazyvim.config")
for _, other in ipairs({ "aerial", "outline" }) do
local extra = "lazyvim.plugins.extras.editor." .. other
if vim.tbl_contains(Config.json.data.extras, extra) then
other = other:gsub("^%l", string.upper)
LazyVim.error({
"**Trouble v3** includes support for document symbols.",
("You currently have the **%s** extra enabled."):format(other),
"Please disable it in your config.",
})
if vim.tbl_contains(Config.json.data.extras, "lazyvim.plugins.extras.editor.trouble-v3") then
for _, other in ipairs({ "aerial", "outline" }) do
local extra = "lazyvim.plugins.extras.editor." .. other
if vim.tbl_contains(Config.json.data.extras, extra) then
other = other:gsub("^%l", string.upper)
LazyVim.error({
"**Trouble v3** includes support for document symbols.",
("You currently have the **%s** extra enabled."):format(other),
"Please disable it in your config.",
})
end
end
end