docs: modify readme file
This commit is contained in:
@ -4,14 +4,13 @@ local core = require("Trans.core")
|
||||
|
||||
|
||||
local function get_opts(opts)
|
||||
|
||||
local mode = vim.api.nvim_get_mode().mode
|
||||
local default_conf = {
|
||||
method = vim.api.nvim_get_mode().mode,
|
||||
engine = {
|
||||
'offline',
|
||||
-- TODO : other engine
|
||||
},
|
||||
method = mode,
|
||||
engine = conf.base.engine,
|
||||
win = {
|
||||
style = 'cursor',
|
||||
style = conf.style.ui[opts.method or mode],
|
||||
width = conf.style.window.cursor.width,
|
||||
height = conf.style.window.cursor.height
|
||||
},
|
||||
@ -36,7 +35,6 @@ local function get_opts(opts)
|
||||
return vim.tbl_extend('force', default_conf, opts)
|
||||
end
|
||||
|
||||
|
||||
-- EXAMPLE :
|
||||
-- require('Trans').translate({
|
||||
-- method = 'input', -- 不填则自动判断mode获取查询的单词
|
||||
@ -85,7 +83,6 @@ local function create_win(win)
|
||||
return bufnr, winid
|
||||
end
|
||||
|
||||
|
||||
local function translate(opts)
|
||||
vim.validate {
|
||||
opts = { opts, 'table', true }
|
||||
|
Reference in New Issue
Block a user