Skip to content

About

A plugin that helps people learns japanese with using Neovim

Topics

Resources

Stars

17 stars

Watchers

0 watching

Forks

Repository files navigation

辞書 jisho.nvim 🌸


A blazing fast, zero-dependency Japanese dictionary plugin for Neovim, powered by Jisho.org.

Good for Japanese learners, anime enthusiasts, or anyone reading Japanese documentation and source code.

Warning

This plugin requires latest 0.13 nightly

2026-11-22.15-51-03.mp4

Preview Image

Layout Previews

Compact Layout
Spacious Layout
Super Spacious Layout

✨ Features

  • Async: Built on Neovim 0.13+ vim.async and vim.net.request (with retries), curl as fallback. Never blocks your UI.
  • Zero Dependencies: Works out of the box. Optional: snacks.nvim, budoux.lua.
  • Markdown Results: Reading, common/JLPT tags, other forms, tags, numbered senses with usage notes and see-also.
  • Smart UI: Uses snacks.nvim if installed, otherwise a native floating window.
  • Persistent Cache: Results are kept for 5 minutes, also across restarts (stdpath('cache')/jisho_cache.json).
  • Request Deduplication: Searching a word that is already being fetched does not send a second request.
  • Search History: :JishoHistory, <CR> to search again.
  • Navigation: j/k jump between entries and senses, w/b/e/ge move by Budoux phrase in Japanese text, like Vim elsewhere.
  • Vibe Coded: Minimalist code, extreme performance, examined by author.

📦 Installation

One keymap covers both modes: :Jisho looks up the word under the cursor in Normal mode and the selection in Visual mode.

Method 1: Native vim.pack

vim.pack.add({ 'https://github.com/Imngzx/jisho.nvim' })

vim.keymap.set({ 'n', 'x' }, '<leader>tj', '<Cmd>Jisho<CR>', { desc = 'Jisho' })

Method 2: lazy.nvim

{
  'Imngzx/jisho.nvim',
  cmd = { 'Jisho', 'JishoHistory' },
  keys = {
    { '<leader>tj', '<Cmd>Jisho<CR>', mode = { 'n', 'x' }, desc = 'Jisho' },
  },
  opts = {},
}

Method 3: Resonance.nvim

require('resonance').load({
  'https://github.com/Imngzx/jisho.nvim',
  dependencies = { 'https://github.com/atusy/budoux.lua' }, -- optional
  cmd = { 'Jisho', 'JishoHistory' },
  keys = {
    { { 'n', 'x' }, '<leader>tj', '<Cmd>Jisho<CR>', { desc = 'Jisho' } },
  },
})

⚙️ Configuration

Nothing to configure: calling setup() is optional. To change something, pass only that key:

require('jisho').setup({ layout = 'compact' })

All options and their defaults:

require('jisho').setup({
  use_snacks = pcall(require, 'snacks'), -- false: native floating window
  use_budoux = pcall(require, 'budoux'), -- Budoux phrase motions in Japanese text
  layout = 'spacious',                   -- compact | spacious | super_spacious
  timeout = 10000,                       -- give up on a request after this many ms
  notify = nil,                          -- status: nil = auto, true = spinner notification, false = progress message
  window = {
    width = 0.6,        -- ratio of the editor width
    height = 0.7,       -- ratio of the editor height
    border = 'rounded', -- single | double | rounded | solid | shadow | none
  },
})

Tip

The desc shows up in which-key.

My own setup: jisho.lua in Stellar:Vim.

🚀 Usage

Command Line

You can search any word anywhere via the command line:

:Jisho 食べる
:Jisho hello
:'<,'>Jisho       " the last visual selection

Keymaps

With the keymap above, <leader>tj looks up the word under the cursor (Normal mode) or the selection (Visual mode).

While a search runs, its status shows as an animated spinner notification if you use a notifier plugin (snacks.notifier, noice, nvim-notify). With plain Neovim it is a progress message instead, so :messages does not fill up with spinner frames. Force either with notify = true / false.

User Commands

Command Description
:Jisho [word] Search for a word (word under cursor if omitted; :'<,'>Jisho for the selection)
:JishoHistory Open search history picker (snacks.picker or native)
:JishoDedupe inflight Inspect in-flight requests
:JishoDedupe clear-inflight Clear all in-flight requests
:JishoDedupe clear-cache Clear search cache
:JishoDedupe refresh [word] Force refresh (bypasses cache)
:JishoRefresh [word] Shortcut for force refresh

Result Window Navigation

Key Action
j / k Jump between senses/entries
w b e ge Word motions; Budoux phrases in Japanese text
q / <Esc> Close window

In :JishoHistory, <CR> searches the selected entry again.

🤝 Requirements

Full reference: :help jisho.

License

This project is licensed under the MIT License.

About

A plugin that helps people learns japanese with using Neovim

Topics

Resources

Stars

17 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages