nvim: add auto ime change
This commit is contained in:
parent
883103e2e6
commit
a8e4862e0b
31
dot_config/nvim/exact_lua/exact_plugins/exact_editor/ime.lua
Normal file
31
dot_config/nvim/exact_lua/exact_plugins/exact_editor/ime.lua
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
return {
|
||||||
|
{
|
||||||
|
"pysan3/fcitx5.nvim",
|
||||||
|
cond = function()
|
||||||
|
return vim.fn.executable("fcitx5-remote") == 1
|
||||||
|
end,
|
||||||
|
event = { "ModeChanged" }, -- 在模式改變時載入插件
|
||||||
|
config = function()
|
||||||
|
require("fcitx5").setup() -- 初始化插件
|
||||||
|
|
||||||
|
-- 以下是手動指定規則
|
||||||
|
-- local en = "keyboard-us"
|
||||||
|
-- local tw = "chewing"
|
||||||
|
|
||||||
|
-- require("fcitx5").setup({
|
||||||
|
-- imname = {
|
||||||
|
-- norm = en,
|
||||||
|
-- ins = tw,
|
||||||
|
-- cmd = en,
|
||||||
|
-- },
|
||||||
|
-- remember_prior = false,
|
||||||
|
-- })
|
||||||
|
|
||||||
|
-- -- If you are using `jk` to escape, map 全角のjk.
|
||||||
|
-- vim.cmd([[
|
||||||
|
-- inoremap <silent> jk <Esc>
|
||||||
|
-- tnoremap <silent> jk <Esc>
|
||||||
|
-- ]])
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user