From 676e6a9a425bcd88e4bd5043e0e4d5f9ba203f46 Mon Sep 17 00:00:00 2001 From: Sabu Siyad Date: Tue, 3 Jan 2023 00:52:30 +0530 Subject: [PATCH] fix: change error when no annotation convention is found Signed-off-by: Sabu Siyad --- lua/neogen/generator.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lua/neogen/generator.lua b/lua/neogen/generator.lua index 7fe045b..1086259 100644 --- a/lua/neogen/generator.lua +++ b/lua/neogen/generator.lua @@ -253,9 +253,10 @@ return setmetatable({}, { local template = language.template if not template or not template.annotation_convention then - notify("Type `" .. node_type .. "` not supported", vim.log.levels.WARN) + notify("Language " .. filetype .. " does not support any annotation convention", vim.log.levels.WARN) return end + annotation_convention = annotation_convention or {} if annotation_convention[filetype] and not template[annotation_convention[filetype]] then notify(