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

This commit is contained in:
Iordanis Petkakis 2024-04-15 14:24:33 +03:00
parent bb36f71b77
commit c2d6c56eb2

View file

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