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".
Right now it's in development so it's fully declarative but soon we should get a nix build along with a rockspec.
Dependencies:
- sudachi_rs as a tokenizer (ie., split words)
- edict_database as sqlite databases
- alogger for logging
- official sqlite bindings for lua 'sqlite'
- utf8 to get utf8
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
- 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.
Run :RikaiDownload
, else do:
- clone https://github.com/odrevet/edict_database.git (fetch)
- nix shell nixpkgs#dart
- rikaitan
- tagainjisho
- On android, I love Kanji study
- ichiran