docs: add highlight group

This commit is contained in:
JuanZoran 2022-12-21 17:05:28 +08:00
parent 2422be9df5
commit 324fd23010
2 changed files with 15 additions and 1 deletions

View File

@ -5,6 +5,7 @@
- [安装](#安装)
- [配置](#配置)
- [快捷键绑定](#快捷键绑定)
- [高亮组](#高亮组)
- [声明](#声明)
- [感谢](#感谢)
- [TODO](#todo)
@ -120,6 +121,20 @@ vim.keymap.set('v', 'mm', '<Esc><Cmd>TranslateSelectWord<CR>')
```
## 高亮组
```lua
hlgroup = {
word = 'TransWord',
phonetic = 'TransPhonetic',
ref = 'TransRef', -- 如: 标签: | 中文翻译: 之类的前导词
tag = 'TransTag',
exchange = 'TransExchange',
pos = 'TransPos',
zh = 'TransZh',
en = 'TransEn',
}
```
## 声明
- 本插件词典基于[ECDICT](https://github.com/skywind3000/ECDICT)

View File

@ -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' })