A Rust shared library that provides the interface for Vim keyboard layout switch plugin.
cargo build -r
g:XkbSwitchLib
in your .vimrc settings.
let g:XkbSwitchEnabled = 1
let g:XkbSwitchLib = '<PathToBuildDir>/target/release/libswaykbswitch.so'
When you run vim with sudo command you should preserve environment variable.
SWAYSOCK
.
Example of run with sudo:
sudo --preserve-env=SWAYSOCK vim
You can put sudo alias into you .bashrc to fix this problem.