Giter Club home page Giter Club logo

jieba-lua's People

Contributors

noearc avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Forkers

cycode0527

jieba-lua's Issues

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

报错信息如下:

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

切换Buffer的时候最好重新update一下Lines

重新进入nvim恢复之前的session会没有办法使用分词;
编辑完一个文件切换另一个Buffer的时候也会没有办法立即适应当前环境中的Lines。

最好在触发事件里加入BufEnter。

vim.api.nvim_create_autocmd({ "InsertLeave", "TextChanged", "TextChangedI", "BufEnter" }, { callback = update_lines })

不过我感觉是不是频繁切换重新调用计算开销会很大,能不能把计算范围缩小到当前可视页面,或者每次只计算上一个或下一个分词的位置。

某些情况下可能会出现找不到 lpeg.utfR() 方法的情况

装上这个插件后,可能会出现按下 e 之类的按键,出现 attempt to call a nil value (field 'utfR') 的情况。这种情况与插件本身无关,似乎是 nvim 自己的问题。我目前已解决,只是在此记录一下。
image

我的系统: Fedora 40 ,nvim 原本使用 dnf install 安装,但是出现缺失 lpeg.utfR() 方法的情况。在换用 appimage 方法安装 neovim 后问题解决。暂时不能稳定复现。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.