-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pantran.motion_translate
doesn't work
#3
Comments
Hi! You need to use an local pantran = require("pantran")
local opts = {noremap = true, silent = true, expr = true}
vim.keymap.set("n", "mt", pantran.motion_translate, opts)
vim.keymap.set("x", "mt", pantran.motion_translate, opts) |
Oh, I just realized that the example mappings in the README do not contain the |
For the example mappings to work the argument must be treated as an expression. The necessary flag was missing for that in the `opts` table (#3).
Ah yes, you're right!
Oh ok
Good that it's added now ^^ |
Ah yes, that might be a bit tricky. Did you set up a Bearer token or API key for Google somewhere? If not Pantran uses a fallback API. Since the options and language identifiers can be different for that configuration is done in the pantran.setup({
default_engine = "google",
engines = {
google = {
fallback = {
default_source = "en",
default_target = "de",
}
}
}
}) |
Yay, it's fully working now as expected! Thank you :) |
I think this should be written somewhere in the README. |
Hi! I have the following keybindings at the moment:
When I do
nvim /tmp/test.txt
and pressmt
nothing happens.But if I use
instead, pressing
mt
works in normal mode but not in visual mode.The text was updated successfully, but these errors were encountered: