From 36865cc17d6306607e303ae76906bc98b9dd7cc2 Mon Sep 17 00:00:00 2001 From: JuanZoran <1430359574@qq.com> Date: Fri, 7 Apr 2023 19:57:52 +0800 Subject: [PATCH] chore: add warning message --- lua/Trans/core/conf.lua | 1 + lua/Trans/core/setup.lua | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/lua/Trans/core/conf.lua b/lua/Trans/core/conf.lua index dd0d941..ca4ed35 100644 --- a/lua/Trans/core/conf.lua +++ b/lua/Trans/core/conf.lua @@ -6,6 +6,7 @@ return { ---@type string the directory for database file and password file dir = require 'Trans'.plugin_dir, + warning = true, debug = true, ---@type 'default' | 'dracula' | 'tokyonight' global Trans theme [see lua/Trans/style/theme.lua] theme = 'default', -- default | tokyonight | dracula diff --git a/lua/Trans/core/setup.lua b/lua/Trans/core/setup.lua index f1cb675..34ff508 100644 --- a/lua/Trans/core/setup.lua +++ b/lua/Trans/core/setup.lua @@ -52,4 +52,12 @@ return function(opts) set_strategy_opts(conf) define_highlights(conf) + + if Trans.conf.warning then + vim.notify([[ +新版本v2已经发布, 见: + https://github.com/JuanZoran/Trans.nvim +请使用当前默认(v2)分支 + ]], vim.log.levels.WARN) + end end