通过 wry 打开一个 webview 窗口,然后打开某个翻译平台的网页翻译内容,并通过 js 代码屏蔽掉不需要的内容,专注于翻译内容本身。
ctrl+c
后,在读取剪贴板的内容```shell cargo install --git https://github.com/fzdwx/popup-translation
fanyi hello fanyi -p youdao 你好
ctrl+shift+c
打开窗口fanyi
alt+s
打开窗口fanyi --show=alt+s
fanyi --position=100,100
fanyi --help ```
lua
map("n", "<leader>fy", function()
local word = vim.fn.expand("<cWORD>")
local cmd = { "fanyi", word }
vim.fn.jobstart(cmd, { detach = true })
end, { desc = "qwe" })
top_left
, top_center
, top_right
, center
...MIT