Skip to content
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

lazyvim下安装后找不到utf-8库 #2

Open
drunkenQCat opened this issue Jan 21, 2024 · 14 comments
Open

lazyvim下安装后找不到utf-8库 #2

drunkenQCat opened this issue Jan 21, 2024 · 14 comments

Comments

@drunkenQCat
Copy link

报错信息如下:

Error executing lua .../AppData/Local/nvim-data/lazy/jieba-lua/lua/jb_utils.lua:2: module 'lua-utf8' not found:
no field package.preload['lua-utf8']
cache_loader: module lua-utf8 not found
cache_loader_lib: module lua-utf8 not found
no file '.\lua-utf8.lua'
no file 'C:\Program Files\Neovim\bin\lua\lua-utf8.lua'
no file 'C:\Program Files\Neovim\bin\lua\lua-utf8\init.lua'
no file '.\lua-utf8.dll'
no file 'C:\Program Files\Neovim\bin\lua-utf8.dll'
no file 'C:\Program Files\Neovim\bin\loadall.dll'
stack traceback:
[C]: in function 'require'
.../AppData/Local/nvim-data/lazy/jieba-lua/lua/jb_utils.lua:2: in main chunk
[C]: in function 'require'
...tor/AppData/Local/nvim-data/lazy/jieba-lua/lua/jieba.lua:2: in main chunk
[C]: in function 'require'
...pData/Local/nvim-data/lazy/jieba.nvim/lua/jieba_nvim.lua:2: in main chunk
[C]: in function 'require'
[string ":lua"]:1: in main chunk

@neo451
Copy link
Owner

neo451 commented Jan 22, 2024

试试luarocks install lua-utf8吧,暂时这样,之后会彻底解决,感谢反馈

@drunkenQCat
Copy link
Author

试试luarocks install lua-utf8吧,暂时这样,之后会彻底解决,感谢反馈

8太行,我折腾了一天,从windows到linux,最后就算编译出来了utf、lpeg这几个库,到实际用的时候也会提醒我lpeg有问题……

我之后有空查查nvim插件debug的方法,有新进展我会来来这个issue说。

@cxwx
Copy link

cxwx commented Apr 14, 2024

╰─ luarocks install --check-lua-versions lua-utf8
lua-utf8 not found for Lua 5.4.
Checking if available for other Lua versions...
Checking for Lua 5.1...
Checking for Lua 5.2...
Checking for Lua 5.3...

@neo451
Copy link
Owner

neo451 commented Apr 15, 2024

sry大家,我回来了hh,我当时对neovim的脚本和luarocks的关系完全没搞懂hh,现在我知道怎么解决了,等我这两天更新一下

@drunkenQCat
Copy link
Author

sry大家,我回来了hh,我当时对neovim的脚本和luarocks的关系完全没搞懂hh,现在我知道怎么解决了,等我这两天更新一下

好耶!

@cxwx
Copy link

cxwx commented Apr 16, 2024

update 后新的 bug,缺少lpeg模块

E5108: Error executing lua ...nxu/.local/share/nvim/lazy/jieba-lua/lua/jieba/utils.lua:6: m
odule 'lpeg' not found:
        no field package.preload['lpeg']
        ```

@cxwx
Copy link

cxwx commented Apr 16, 2024

更新 luarock install lpeg 之后,新的BUG

E5108: Error executing lua ...enxu/.local/share/nvim/lazy/jieba-lua/lua/jieba/init.lua:30:
module 'jieba.dict' not found:
        no field package.preload['jieba.dict']
cache_loader: module jieba.dict not found
cache_loader_lib: module jieba.dict not found

@cxwx
Copy link

cxwx commented Apr 16, 2024

删除缺失的 require("jieba.dict") 部分,直接使用 gen_pfdict("dict/dict.txt")

E5108: Error executing lua ...enxu/.local/share/nvim/lazy/jieba-lua/lua/jieba/init.lua:36:
bad argument #1 to 'pairs' (table expected, got nil)
stack traceback:
        [C]: in function 'pairs'

@cxwx
Copy link

cxwx commented Apr 16, 2024

应该是 无法正常识别 ./dict/dict.txt 的路径,改绝对路径后可以使用。
mark 等修复

@neo451
Copy link
Owner

neo451 commented Apr 17, 2024

上传了之前漏掉的dict.lua, 以及我发现lpeg在neovim里就有hh,所以现在应该是在nvim里会自动使用vim.lpeg,用luarocks安装会自动下载lpeg了,感谢反馈哈,看看现在能不能用?

@cxwx
Copy link

cxwx commented Apr 17, 2024

新的bug,
在中文上 w b 跳词的时候会触发

lua luarocks?
luarocks

并卡住,需要按下enter才能继续

@neo451
Copy link
Owner

neo451 commented Apr 18, 2024

😂应该是插件那边的问题,我再去整理一下,等几天吧,彻底处理测试一下再用

@cxwx
Copy link

cxwx commented May 10, 2024

似乎在中英文切换时候,才会触发, 比如以下情况

  { "ZSaberLv0/ZFVimIM_japanese_base", enabled = false }, -- : 一些基本的日语单词

@cxwx
Copy link

cxwx commented Jul 21, 2024

似乎用最新的mac homebrew 环境 修复了。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants