diff --git a/README.md b/README.md index 4b90469..968a261 100644 --- a/README.md +++ b/README.md @@ -255,7 +255,6 @@ require'Trans'.setup { **示例:** > 示例中展示, 将`mm`映射成快捷键 ```lua --- normal-mode vim.keymap.set({'n', 'v'}, 'mm', 'Translate') vim.keymap.set('n', 'mi', 'TranslateInput') diff --git a/lua/Trans/view/float.lua b/lua/Trans/view/float.lua index 650335a..44862c8 100644 --- a/lua/Trans/view/float.lua +++ b/lua/Trans/view/float.lua @@ -3,7 +3,6 @@ local m_window local m_result local m_content - local engine_map = { ['本地'] = 'offline', ['百度'] = 'baidu', diff --git a/lua/Trans/window.lua b/lua/Trans/window.lua index 99f6c2a..c544ef4 100644 --- a/lua/Trans/window.lua +++ b/lua/Trans/window.lua @@ -264,7 +264,9 @@ return function(entry, option) win:bufset('buftype', 'nofile') api.nvim_win_set_hl_ns(win.winid, win.hl) - win:set('winhl', 'Normal:TransWin,FloatBorder:TransBorder,NormalFloat:TransBorder') + win:set_hl('Normal', { link = 'TransWin' }) + win:set_hl('FloatBorder', { link = 'TransBorder' }) + win:set_hl('NormalFloat', { link = 'TransBorder' }) ---@diagnostic disable-next-line: return-type-mismatch return win end