-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: remove unused code and format
- Loading branch information
1 parent
6784b4e
commit 02ca012
Showing
4 changed files
with
160 additions
and
171 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,30 @@ | ||
local FcitxUserInterfaceCapabilityClientSideInputPanel = 2^39 | ||
local FcitxUserInterfaceCapabilityKeyEventOrderFix = 2^37 | ||
local FcitxUserInterfaceCapabilityClientSideInputPanel = 2 ^ 39 | ||
local FcitxUserInterfaceCapabilityKeyEventOrderFix = 2 ^ 37 | ||
|
||
return { | ||
PluginName = "fcitx5uinvim", | ||
PluginCapabilities = FcitxUserInterfaceCapabilityClientSideInputPanel + FcitxUserInterfaceCapabilityKeyEventOrderFix, | ||
FcitxDBusName = "org.freedesktop.portal.Fcitx", | ||
FcitxInputMethod1DBusPath = "/org/freedesktop/portal/inputmethod", | ||
FcitxInputMethod1DBusInterface = "org.fcitx.Fcitx.InputMethod1", | ||
FcitxInputContext1DBusInterface = "org.fcitx.Fcitx.InputContext1", | ||
FcitxKey = { | ||
backspace = 0xff08, | ||
space = 0x0020, | ||
left = 0xff51, | ||
up = 0xff52, | ||
right = 0xff53, | ||
down = 0xff54, | ||
enter = 0xff0d, | ||
tab = 0xfe20, | ||
}, | ||
FcitxKeyState = { | ||
no = 0, | ||
shift = 1, | ||
ctrl = 4, | ||
alt = 8, | ||
super = 64, | ||
} | ||
PluginName = "fcitx5uinvim", | ||
PluginCapabilities = | ||
FcitxUserInterfaceCapabilityClientSideInputPanel + | ||
FcitxUserInterfaceCapabilityKeyEventOrderFix, | ||
FcitxDBusName = "org.freedesktop.portal.Fcitx", | ||
FcitxInputMethod1DBusPath = "/org/freedesktop/portal/inputmethod", | ||
FcitxInputMethod1DBusInterface = "org.fcitx.Fcitx.InputMethod1", | ||
FcitxInputContext1DBusInterface = "org.fcitx.Fcitx.InputContext1", | ||
FcitxKey = { | ||
backspace = 0xff08, | ||
space = 0x0020, | ||
left = 0xff51, | ||
up = 0xff52, | ||
right = 0xff53, | ||
down = 0xff54, | ||
enter = 0xff0d, | ||
tab = 0xfe20, | ||
}, | ||
FcitxKeyState = { | ||
no = 0, | ||
shift = 1, | ||
ctrl = 4, | ||
alt = 8, | ||
super = 64, | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,22 @@ | ||
local M = {} | ||
|
||
local msg = "" | ||
|
||
-- https://stackoverflow.com/a/17878208 | ||
M.prequire = function (m) | ||
local ok, err = pcall(require, m) | ||
if not ok then return nil, err end | ||
return err | ||
M.prequire = function(m) | ||
local ok, err = pcall(require, m) | ||
if not ok then return nil, err end | ||
return err | ||
end | ||
|
||
M.warning = function () | ||
if #msg ~=0 then | ||
print("fcitx5-ui.nvim not load: " .. msg) | ||
end | ||
return "" | ||
M.warning = function() | ||
if #msg ~= 0 then | ||
print("fcitx5-ui.nvim not load: " .. msg) | ||
end | ||
return "" | ||
end | ||
|
||
M.set_msg = function (m) | ||
msg = m | ||
M.set_msg = function(m) | ||
msg = m | ||
end | ||
|
||
return M | ||
|