From 12a16cf7f4537dfa373861fdbdcef673f29bc0fc Mon Sep 17 00:00:00 2001 From: Dreaded_X Date: Fri, 20 Feb 2026 02:01:38 +0100 Subject: [PATCH] Enable schema selection in all filetypes --- nvim/dot-config/nvim/lua/plugins/schema-companion.lua | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/nvim/dot-config/nvim/lua/plugins/schema-companion.lua b/nvim/dot-config/nvim/lua/plugins/schema-companion.lua index 7382da3..bbe55a7 100644 --- a/nvim/dot-config/nvim/lua/plugins/schema-companion.lua +++ b/nvim/dot-config/nvim/lua/plugins/schema-companion.lua @@ -14,10 +14,14 @@ return { { "ys", 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, - desc = "Yaml schema", - ft = "yaml", + desc = "Select schema", }, }, --- @module "schema-companion"