Provides translation commands using DeepL API.
2022-09-10-1.20.54.mp4
This plugin requires gw31415/deepl.vim.
use {
'gw31415/deepl-commands.nvim',
requires = {
'gw31415/deepl.vim',
'gw31415/fzyselect.vim', -- Optional
},
config = function()
require 'deepl-commmands'.setup {
selector_func = require 'fzyselect'.start, -- Default value is `vim.ui.select`
default_target = 'JA', -- Default value is 'EN'
}
end
}
When connecting to the DeepL API using the following commands, you will be
asked for your Auth Key if g:deepl_authkey
is not set. This value is stored
in the file opts.deepl_keyfile
and will be loaded automatically the next time
it is started.
translates the selected lines and adds the translation just below the
selection. If the command called with a exclamation mark ( :{range}DeepL!
),
the lines will be replaced with the translation.
Sets the language to which the :DeepL
command will be translated.
- deepl.vim: Add Vim function to wrap the DeepL API.
- fzyselect.vim: The fuzzy selector seen in the top video.
- nvim-notify: The
vim.notify
function seen in the top video.