Open muhfaris opened 11 months ago
Hi @muhfaris, I don't use lazy.nvim, but maybe I can still help you. Could you please describe your specific problem in more detail?
thanks @potamides for reply
I try open the dialog with the command <leader>ttx
, but nothing happen
return {
{
"potamides/pantran.nvim",
config = function ()
local pantran = require('pantran')
pantran.setup({})
local opts = {noremap = true, silent = true, expr = true}
vim.keymap.set("n", "<Leader>tr", pantran.motion_translate, opts)
vim.keymap.set("n", "<leader>trr", function() return pantran.motion_translate() .. "_" end, opts)
vim.keymap.set("x", "<leader>tr", pantran.motion_translate, opts)
end,
},
}
{
"potamides/pantran.nvim",
keys = {
{
"<leader>tr",
function()
require("pantran").motion_translate()
end,
mode = {"n", "v"},
desc = "Translate",
},
},
opts = {},
config = function (_, opts)
require('pantran').setup(opts)
end,
},
it's still not work for me
Is this the first plugin you are installing?
Because It works in my setup (Fairly modified)
(e.g) do you have a snippet like so?
require("lazy").setup {
-- PLUGINS HERE
}
{ "potamides/pantran.nvim", keys = { { "<leader>tr", function() require("pantran").motion_translate() end, mode = {"n", "v"}, desc = "Translate", }, }, opts = {}, config = function (_, opts) require('pantran').setup(opts) end, },
Usually lazyvim configs works for astrovim I just need to add return
on first line.
I could see the command <leader>tr
but nothing happen :(, any idea why?
Ok just to point out, I used this config and it worked, I didn't added line by line to check what was missing, But it worked for AstroVim
;)
https://github.com/potamides/pantran.nvim/issues/17#issuecomment-1636822777
return { { "potamides/pantran.nvim", config = function () local pantran = require('pantran') pantran.setup({}) local opts = {noremap = true, silent = true, expr = true} vim.keymap.set("n", "<Leader>tr", pantran.motion_translate, opts) vim.keymap.set("n", "<leader>trr", function() return pantran.motion_translate() .. "_" end, opts) vim.keymap.set("x", "<leader>tr", pantran.motion_translate, opts) end, }, }
It also works but you need to select the text ;)
hi @potamides can you explain to me how to setup this plugin using lazy.nvim my config below, is not work properly.
thanks