Thanks to visit codestin.com
Credit goes to github.com

Skip to content

wsdjeg/smart-ime.nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

smart-ime.nvim

Smart per-buffer IME switching for Neovim.

GitHub License GitHub Issues or Pull Requests GitHub commit activity GitHub Release luarocks

Features

  • Per-buffer IME state
    Remembers input method state separately for each buffer.

  • Automatic IME switching

    • Switches to English when leaving Insert mode
    • Restores previous IME when re-entering Insert mode
  • Focus-aware normalization
    Ensures IME state is consistent when Neovim regains focus.

  • Async & non-blocking
    Uses vim.system() for asynchronous IME querying and switching.

  • Optional logging
    Integrates with logger.nvim when available.

  • Minimal & predictable behavior
    Reacts only to editor events, no background polling.

How it works

  1. On InsertLeave, the current IME state is queried and saved per buffer.
  2. IME is switched to English to ensure normal-mode safety.
  3. On InsertEnter, the previously saved IME state is restored.
  4. On focus gain (FocusGained), IME state is normalized based on current mode.

Installation

Using nvim-plug:

return {
    'wsdjeg/smart-ime.nvim',
    opts = {
        imselect = '~/bin/im-select-mspy.exe',
    },
}

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Sponsor this project

Packages

No packages published

Languages