From a8e4862e0b963d03808fbdd82f418f2b8bc6c1ba Mon Sep 17 00:00:00 2001 From: Yuan Chiu Date: Thu, 1 May 2025 08:46:14 +0800 Subject: [PATCH] nvim: add auto ime change --- .../exact_plugins/exact_editor/ime.lua | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 dot_config/nvim/exact_lua/exact_plugins/exact_editor/ime.lua diff --git a/dot_config/nvim/exact_lua/exact_plugins/exact_editor/ime.lua b/dot_config/nvim/exact_lua/exact_plugins/exact_editor/ime.lua new file mode 100644 index 0000000..bff120a --- /dev/null +++ b/dot_config/nvim/exact_lua/exact_plugins/exact_editor/ime.lua @@ -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 jk + -- tnoremap jk + -- ]]) + end, + }, +}