JuanZoran/Trans.nvim

windows版的lazyvim找不到词库

Closed this issue · 8 comments

我在用lazyvim windows版的,但是把词库放入指定位置,插件找不到database.

能否提供一下checkhealth的结果呢?

  • ERROR Stardict database not found
    [Manually]: Please check the doc in github: [https://github.com/JuanZoran/Trans.nvim]
    [Automatically]: Try to run :lua require "Trans".install()

  • WARNING vim.health.report_ok() is deprecated, use vim.health.ok() instead. :help |deprecated|
    This feature will be removed in Nvim version 0.11

  • OK You have [neovim-nightly]

  • ERROR Backend configuration file [v:null\Trans.json] invalid
    Please check the doc in github: [https://github.com/JuanZoran/Trans.nvim]

你尝试配置一下dir参数, 这个参数决定了词库以及api文件的存放目录, 更改到你喜欢的目录, 然后将词库放到该目录就可以了

好的,我试试,非常感谢

same problem

试了更改dir的值,好像不起作用

plugin_dir = debug.getinfo(1, 'S').source:sub(2):match('(.-)lua' .. sep .. 'Trans'),

在windows上,debug.getinfo(1, 'S').source返回的路径分隔符是/而不是\,会导致后边匹配失败。

感谢问题反馈, 但是目前在赶土木工程作业, 可能要过两天修了 : (