GithubHelp home page GithubHelp logo

utahta / trans.nvim Goto Github PK

View Code? Open in Web Editor NEW
21.0 4.0 4.0 3.5 MB

Google language translator plugin for Neovim

License: MIT License

Vim Script 4.25% Makefile 1.35% Go 94.40%
neovim-plugin translate google

trans.nvim's Introduction

trans.nvim

trans.nvim is a plugin for Neovim to translate text with Google Translator.

message

trans_nvim_message

preview

trans_nvim_preview

floating window

trans_nvim_floating_window

Required

You must first set up authentication by creating a API Key or service account of GCP.

Then you need to install the Go of version 1.11 or more.

Using API Key

The API Key documentation can be found here.

Please set the environment variable TRANS_API_KEY to the API Key.

Or Using Service Account

The service account documentation can be found here.

Please set the environment variable GOOGLE_APPLICATION_CREDENTIALS to the file path of the JSON file that contains your service account key.

Note

You need a little bit of money to use google translate API.
e.g. it costs $0.06 for 2889 characters.

Installation

For vim-plug

Plug 'utahta/trans.nvim', {'do': 'make'}

Settings

let g:trans_lang_locale = 'ja'
let g:trans_lang_output = 'preview'

To use floating windows

Floating windows are supported in neovim >= 0.4.0.

let g:trans_lang_output = 'float'

A Floating window is automatically hide when cursor is moved.

trans.nvim's People

Contributors

utahta avatar zchee avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.