potamides / pantran.nvim

Use your favorite machine translation engines without having to leave your favorite editor.
MIT License
289 stars 2 forks source link

Engine configurations do not apply. #4

Closed NikolaM-Dev closed 1 year ago

NikolaM-Dev commented 1 year ago

Description

Using the following configuration and making several attempts with different default_target and default_source settings

local status_ok, pantran = pcall(require, 'pantran')
if not status_ok then
    return
end

pantran.setup({
    default_engine = 'google',
    engines = {
        google = {
            default_target = 'es',
        },
    },
})

I always get the same result image

default_targe = 'en' & default_source = 'auto'

potamides commented 1 year ago

Please try #3 and see if it works. Btw, is there a particular reason you use pcall for requiring pantran?

NikolaM-Dev commented 1 year ago

Please try #3 and see if it works. Btw, is there a particular reason you use pcall for requiring pantran?

This solves my problem thank you very much. The need for pcall is to have a neovim setup where all errors are handled.