Trans.nvim/lua/Trans/conf/default.lua

120 lines
2.5 KiB
Lua
Raw Normal View History

2023-01-05 16:24:50 +08:00
local M = {}
M.conf = {
style = {
ui = {
2023-01-05 16:24:50 +08:00
input = 'float',
2023-01-10 23:37:26 +08:00
n = 'cursor',
v = 'cursor',
2023-01-05 16:24:50 +08:00
},
window = {
2023-01-05 16:24:50 +08:00
cursor = {
border = 'rounded',
2023-01-10 23:37:26 +08:00
width = 40,
height = 50,
2023-01-05 16:24:50 +08:00
},
float = {
border = 'rounded',
2023-01-09 21:30:16 +08:00
width = 0.9,
height = 0.8,
2023-01-05 16:24:50 +08:00
},
},
},
2023-01-10 23:37:26 +08:00
order = {
offline = {
'Title',
'Tag',
'Pos',
'Exchange',
'Translation',
2023-01-10 23:37:26 +08:00
-- NOTE :如果你想限制某个组件的行数可以设置max_size
-- { 'Definition', max_size = 4 },
},
-- online = {
-- -- TODO
-- },
},
2023-01-05 16:24:50 +08:00
ui = {
highlight = {
2023-01-05 16:24:50 +08:00
TransWord = {
fg = '#7ee787',
bold = true,
},
TransPhonetic = {
link = 'Linenr'
2023-01-05 16:24:50 +08:00
},
TransRef = {
fg = '#75beff',
bold = true,
},
TransTag = {
fg = '#e5c07b',
},
TransExchange = {
link = 'TransTag',
},
TransPos = {
link = 'TransTag',
},
2023-01-09 23:20:56 +08:00
TransTranslation = {
2023-01-05 16:24:50 +08:00
link = 'TransWord',
},
2023-01-09 23:20:56 +08:00
TransDefinition = {
-- fg = '#bc8cff',
link = 'Moremsg',
2023-01-05 16:24:50 +08:00
},
TransCursorWin = {
link = 'Normal',
},
TransCursorBorder = {
link = 'FloatBorder',
}
2023-01-05 16:24:50 +08:00
},
icon = {
star = '',
isOxford = '',
notOxford = ''
},
display = {
phnoetic = true,
2023-01-10 14:40:28 +08:00
collins = true,
2023-01-05 16:24:50 +08:00
oxford = true,
-- TODO
-- history = false,
},
},
base = {
db_path = '$HOME/.vim/dict/ultimate.db',
auto_close = true,
engine = {
-- TODO
'offline',
}
2023-01-05 16:24:50 +08:00
},
-- map = {
-- -- TODO
-- },
2023-01-09 15:37:58 +08:00
-- history = {
-- -- TOOD
2023-01-09 15:37:58 +08:00
-- }
2023-01-05 16:24:50 +08:00
-- TODO add online translate engine
-- online_search = {
-- enable = false,
-- engine = {},
-- }
-- TODO register word
}
-- INFO :加载的规则 [LuaRule]
M.replace_rules = {
'order.*',
'ui.highlight.*',
}
2023-01-09 18:57:20 +08:00
2023-01-05 16:24:50 +08:00
return M