Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/uga-rosa/deepl.nvim
Hit deepl api from neovim and display in floating window
https://github.com/uga-rosa/deepl.nvim
Last synced: about 1 month ago
JSON representation
Hit deepl api from neovim and display in floating window
- Host: GitHub
- URL: https://github.com/uga-rosa/deepl.nvim
- Owner: uga-rosa
- License: mit
- Archived: true
- Created: 2021-10-07T20:25:33.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-05-10T12:55:22.000Z (over 2 years ago)
- Last Synced: 2024-08-07T18:37:48.409Z (5 months ago)
- Language: Lua
- Size: 9.77 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
**Use translate.nvim**
[translate.nvim](https://github.com/uga-rosa/translate.nvim)
# deepl.nvim
Hit deepl api from neovim and display in floating window
# Require
- neovim 0.5.0+
- [deepl API account](https://www.deepl.com/en/pro-api/)# Setup
```lua
require("deepl").setup({
authkey = "", -- your deepl api's auth_key
plan = "free" -- your plan ("free" or "pro")
})
```# How to use
Translate.
```lua
require("deepl").translate(, , from, to, mode)
```- \: start line
- \: last line
- from: from language (e.g. "EN", "JA")
- to: to language (same above)
- mode: "f" (floating window) or "r" (replace)Close a floating window.
```lua
lua require("deepl").close()
```# Example setting
Register in command.
```vim
command! -range DeeplJa2EnFloat lua require("deepl").translate(, , "JA", "EN", "f")
command! DeeplClose lua require("deepl").close()
```