diff --git a/README.md b/README.md index bf552ed..23a0f9c 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,7 @@ - [安装](#安装) - [配置](#配置) - [快捷键绑定](#快捷键绑定) + - [高亮组](#高亮组) - [声明](#声明) - [感谢](#感谢) - [TODO](#todo) @@ -120,6 +121,20 @@ vim.keymap.set('v', 'mm', 'TranslateSelectWord') ``` +## 高亮组 +```lua +hlgroup = { + word = 'TransWord', + phonetic = 'TransPhonetic', + ref = 'TransRef', -- 如: 标签: | 中文翻译: 之类的前导词 + tag = 'TransTag', + exchange = 'TransExchange', + pos = 'TransPos', + zh = 'TransZh', + en = 'TransEn', +} + +``` ## 声明 - 本插件词典基于[ECDICT](https://github.com/skywind3000/ECDICT) diff --git a/lua/Trans/highlight.lua b/lua/Trans/highlight.lua index d509ab4..8f3f323 100644 --- a/lua/Trans/highlight.lua +++ b/lua/Trans/highlight.lua @@ -12,7 +12,6 @@ M.hlgroup = { } function M.set_hl() - -- FIXME: highlight doesn't work local set_hl = vim.api.nvim_set_hl set_hl(0, M.hlgroup.word, { fg = '#98c379', bold = true }) set_hl(0, M.hlgroup.phonetic, { fg = '#8b949e' })