Closed Mr-LLLLL closed 1 year ago
i found some config not effected, example
{
default_engine = "google",
engines = {
google = {
default_source = "auto",
default_target = "zh-CN",
fallback = {
default_source = "auto",
default_target = "zh-CN",
}
},
}
}
i test sometimes, this is caused by call local pantran_actions = require("pantran.ui.actions") before, this bug same as above
os version: ubuntu 21.10 neovim version: 0.8.1
Try the following instead, it should work:
{
default_engine = "google",
controls= {
mappings = {
edit = {
n = {
["q"] = require("pantran.ui.actions").close,
},
},
}
},
}
The README uses package.loaded
but this cannot work, I'll update it. Thanks for bringing this to my attention.
thank for your anwser, but i test ["q"] = require("pantran.ui.actions").close, it not work
local pantran_actions = require("pantran.ui.actions")
require("pantran").setup {
default_engine = "google",
engines = {
google = {
default_source = "auto",
default_target = "zh-CN",
fallback = {
default_source = "auto",
default_target = "zh-CN",
}
},
},
controls = {
mappings = {
edit = {
n = { ["q"] = pantran_actions.close}
}
}
},
}
i found call require("pantran.ui.actions") before, other config not work
Please try the latest commit, it should fix your problem!
when i remap:
I test sometimes, if this map include "package.loaded.pantran.ui", then will be reset default_enging to Argos