mirror of
https://github.com/jdhao/nvim-config.git
synced 2025-06-08 14:14:33 +02:00
add ref for checking IME state
This commit is contained in:
parent
1d0609f753
commit
ed52ca5914
@ -8,6 +8,7 @@ end
|
||||
|
||||
local function ime_state()
|
||||
if vim.g.is_mac then
|
||||
-- ref: https://github.com/vim-airline/vim-airline/blob/master/autoload/airline/extensions/xkblayout.vim#L11
|
||||
local layout = vim.fn.libcall(vim.g.XkbSwitchLib, 'Xkb_Switch_getXkbLayout', '')
|
||||
if layout == '0' then
|
||||
return '[CN]'
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user