Be eased to handle multiple inputs methods when changing between normal and insert mode(eg. English and Chinese).
ibus-sw-demo.mp4
- Save and restore input method when entering/leaving insert mode
- Switch input method asynchronously
Install with Packer.nvim:
use {'kevinhwang91/nvim-ibus-sw'}
WIP, I may add extra Lua dependences in the further :)
use {'kevinhwang91/nvim-ibus-sw', event = 'InsertEnter',
config = function()
require('ibus-sw').setup()
end
}
- Use gnome-shell-ibus-switcher to switch input methods that can refresh the input indicator in tray and restore InputMode.
- Enable to switch input sources individually for each window,
gsettings set org.gnome.desktop.input-sources per-window true
You can skip (Limitation)[#Limitation] section :)
If you aren't a Gnome user, the plugin switch input method by ibus engine
command. When
switching input method, tray icon of ibus change nothing.
Using ibus engine
brings a bug when using switch input sources individually for each window
option in input settings in Gnome Desktop Environment, because every progress has a session to save
the input status, and restore the data from the session when you refocus on the application.
ibus engine
can't change this session. Therefore, when you focus lost Neovim window and return
back later, Gnome Desktop will restore the session for raw input status.
The project is licensed under a BSD-3-clause license. See the LICENSE file.