Auto generate docs

This commit is contained in:
JuanZoran 2023-03-10 01:16:36 +00:00 committed by github-actions[bot]
parent 35807247ff
commit a5164bf052

View File

@ -1,4 +1,4 @@
*Trans.txt* For NVIM v0.8.0 Last change: 2023 March 09
*Trans.txt* For NVIM v0.8.0 Last change: 2023 March 10
==============================================================================
Table of Contents *Trans-table-of-contents*
@ -93,7 +93,7 @@ _安装之前, 首先需要明确本插件的依赖:_
- ECDICT <https://github.com/skywind3000/ECDICT>: 插件所用的离线单词数据库
- sqlite.lua: 操作数据库所用的库
- sqlite.lua <https://github.com/kkharji/sqlite.lua>: 操作数据库所用的库
- sqlite3: 数据库
Packer.nvim ~
@ -101,8 +101,8 @@ Packer.nvim ~
>lua
use {
'JuanZoran/Trans.nvim'
run = 'bash ./install.sh',
requires = 'kkharji/sqlite.lua',
run = function() require('Trans').install() end, -- 自动下载使用的本地词库
requires = { 'kkharji/sqlite.lua', 'nvim-lua/plenary.nvim' },
-- 如果你不需要任何配置的话, 可以直接按照下面的方式启动
config = function ()
require'Trans'.setup{
@ -122,8 +122,8 @@ Packer.nvim ~
{ {'n', 'x'}, 'mk' },
{ 'n', 'mi' },
},
run = 'bash ./install.sh', -- 自动下载使用的本地词库
requires = 'kkharji/sqlite.lua',
run = function() require('Trans').install() end, -- 自动下载使用的本地词库
requires = { 'kkharji/sqlite.lua', 'nvim-lua/plenary.nvim' },
config = function()
require("Trans").setup {} -- 启动Trans
vim.keymap.set({"n", 'x'}, "mm", '<Cmd>Translate<CR>', { desc = ' Translate' }) -- 自动判断virtual 还是 normal 模式
@ -146,7 +146,7 @@ Lazy.nvim ~
-- 目前这个功能的视窗还没有做好可以在配置里将view.i改成hover
{ 'mi', '<Cmd>TranslateInput<CR>', desc = ' Translate From Input' },
},
dependencies = { 'kkharji/sqlite.lua', lazy = true },
dependencies = { 'kkharji/sqlite.lua', 'nvim-lua/plenary.nvim' },
opts = {
-- your configuration there
}
@ -178,8 +178,8 @@ Lazy.nvim ~
其他操作系统
- 需要确保安装了`nodejs`
- 进入插件的`tts`目录运行`npm install`
> 如果`install.sh`运行正常则自动安装,如果安装失败,请尝试手动安装
- `title`的配置,只对`neovim 0.9`版本有效
> 如果`install`运行正常则自动安装,如果安装失败,请尝试手动安装
- `title`的配置,只对`neovim 0.9+`版本有效
Festival配置(仅针对linux用户) ~
@ -224,7 +224,11 @@ Festival配置(仅针对linux用户) ~
width = 37,
height = 27,
border = 'rounded',
title = title,
title = vim.fn.has('nvim-0.9') == 1 and {
{ '', 'TransTitleRound' },
{ ' Trans', 'TransTitle' },
{ '', 'TransTitleRound' },
} or nil,
keymap = {
pageup = '[[',
pagedown = ']]',
@ -246,32 +250,10 @@ Festival配置(仅针对linux用户) ~
'BufLeave',
},
auto_play = true,
timeout = 3000,
timeout = 2000,
spinner = 'dots', -- 查看所有样式: /lua/Trans/util/spinner
-- spinner = 'moon'
},
float = {
width = 0.8,
height = 0.8,
border = 'rounded',
title = title,
keymap = {
quit = 'q',
},
animation = {
open = 'fold',
close = 'fold',
interval = 10,
},
tag = {
wait = '#519aba',
fail = '#e46876',
success = '#10b981',
},
engine = {
'本地',
}
},
order = { -- only work on hover mode
'title',
'tag',
@ -285,8 +267,8 @@ Festival配置(仅针对linux用户) ~
notfound = ' ',
yes = '✔',
no = '',
-- --- char: ■ | □ | ▇ | ▏ ▎ ▍ ▌ ▋ ▊ ▉ █
-- --- ◖■■■■■■■◗▫◻ ▆ ▆ ▇⃞ ▉⃞
-- --- char: ■ | □ | ▇ | ▏ ▎ ▍ ▌ ▋ ▊ ▉ █
-- --- ◖■■■■■■■◗▫◻ ▆ ▆ ▇⃞ ▉⃞
cell = '■',
-- star = '⭐',
-- notfound = '❔',
@ -294,29 +276,25 @@ Festival配置(仅针对linux用户) ~
-- no = '❌'
},
theme = 'default',
-- theme = 'dracula',
-- theme = 'tokyonight',
db_path = '$HOME/.vim/dict/ultimate.db',
engine = {
-- baidu = {
-- appid = '',
-- appPasswd = '',
-- },
-- -- youdao = {
-- appkey = '',
-- appPasswd = '',
-- },
},
-- TODO :
-- register word
-- history = {
-- -- TOOD
-- }
-- TODO :add online translate engine
dir = vim.fn.expand('$HOME/.vim/dict'),
-- float = {
-- width = 0.8,
-- height = 0.8,
-- border = 'rounded',
-- keymap = {
-- quit = 'q',
-- },
-- animation = {
-- open = 'fold',
-- close = 'fold',
-- interval = 10,
-- },
-- tag = {
-- wait = '#519aba',
-- fail = '#e46876',
-- success = '#10b981',
-- },
-- },
}
<