Skip to content

teto/rikai.nvim

Repository files navigation

This plugin aims at providing offline translations when hovering asian (japanese for now) characters.

The name is inspired by the great browser rikaitan plugin. 理解 ("rikai") translates to "understanding", "comprehension".

How to install ?

Right now it's in development so it's fully declarative but soon we should get a nix build along with a rockspec.

Dependencies:

How to use ?

Run :RikaiDownload to fetch the dictionaries (just once).

There are no default keymaps so you need to set one

vim.keymap.set('n', '<D-j>', function()
	vim.cmd[[ RikaiLookup ]]
end, { buffer = false, desc = "Japanese lookup" })

You can also call :RikaiLookup 見

Highlights used are:

  • RikaiHighlightWordGroup
  • RikaiNames

Roadmap

  • lux packaging
  • support more tokenizers
  • romaji to kana and vice-versa
  • let users customize display (support https://jpdb.io/)
  • create a top-level Rikai command with subcommands: "lookup", ...
  • ability to focus popup
  • translate visual selection
  • add examples
  • list radicals
  • open db on command (register handle in some state)
  • close it at the end of after some time ?
  • add rikai translate

See wiki for more reference.

How to get the various dictionaries used by rikai.nvim ?

Run :RikaiDownload, else do:

Related software

About

rikaitan for neovim, i.e., japanese translation integrated

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published