Enable schema selection in all filetypes
This commit is contained in:
@@ -14,10 +14,14 @@ return {
|
|||||||
{
|
{
|
||||||
"<leader>ys",
|
"<leader>ys",
|
||||||
function()
|
function()
|
||||||
require("schema-companion").select_schema()
|
local schemas = require("schema-companion").get_matching_schemas()
|
||||||
|
if schemas == nil or #schemas == 0 or (#schemas == 1 and schemas[1].name == "none") then
|
||||||
|
print("No matching schemas")
|
||||||
|
else
|
||||||
|
require("schema-companion").select_matching_schema()
|
||||||
|
end
|
||||||
end,
|
end,
|
||||||
desc = "Yaml schema",
|
desc = "Select schema",
|
||||||
ft = "yaml",
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
--- @module "schema-companion"
|
--- @module "schema-companion"
|
||||||
|
|||||||
Reference in New Issue
Block a user