Skip to content

About

📕 Translating plugin for Neovim

Resources

Stars

0 stars

Watchers

0 watching

Forks

 
 

Latest commit

 

History

306 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

translator.nvim

一个只做一件事的 neovim 查词插件:查英文单词,并把结果显示在命令行区域。

这个版本不再支持:

  • vim / vim8
  • python
  • 多翻译引擎
  • 历史记录
  • 替换文本、剪贴板翻译、日志面板

Requirements

  • neovim >= 0.10
  • curl

Installation

{
  "martins3/translator.nvim",
  config = function()
    require("translator").setup()
  end,
}

Usage

:Translate
:Translate naive
:Translate take off

不传参数时,默认查询光标下单词。

建议映射:

vim.keymap.set("n", "<leader>t", "<cmd>Translate<cr>", { silent = true })

Config

require("translator").setup({
  timeout = 10000,
})

配置项:

  • timeout: curl 超时时间,单位毫秒

Data Source

当前固定使用 dict.cn 的迷你词典页做查询。

License

MIT

About

📕 Translating plugin for Neovim

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages