Evergreen-lxl / Evergreen.lxl

🌳 Treesitter support for Lite XL.
MIT License
36 stars 8 forks source link

Cannot get undefined variable: done #59

Closed rice7th closed 8 months ago

rice7th commented 8 months ago

As the title implies, after installing evergreen and the rust parser, I get this error:

An internal error occourred in a critical part of the application
Error: Error calling predicate 'contains?': .../.config/pragtical/plugins/evergreen/highlights.lua:71: cannot get undefined variable: done
Details can be found in '/home/rice7th/.config/pragtical/error.txt'

error.txt: Error: Error calling predicate 'contains?': ...ce7th/.config/pragtical/plugins/evergreen/highlights.lua:71: cannot get undefined variable: done

stack traceback:
        [C]: in function '(for generator)'
        /home/rice7th/.config/pragtical/plugins/evergreen/init.lua:196: in function 'prev_tokenize_line'
        /home/rice7th/.config/pragtical/plugins/minimap.lua:270: in function 'tokenize_line'
        /home/rice7th/.bin/pragtical/data/core/doc/highlighter.lua:116: in function 'get_line'
        /home/rice7th/.bin/pragtical/data/core/doc/highlighter.lua:126: in function 'each_token'
        /home/rice7th/.config/pragtical/plugins/minimap.lua:541: in function 'draw'
        /home/rice7th/.bin/pragtical/data/core/view.lua:327: in function 'draw_scrollbar'
        /home/rice7th/.bin/pragtical/data/core/docview.lua:601: in function 'old_draw'
        ...
        /home/rice7th/.bin/pragtical/data/plugins/contextmenu.lua:32: in function 'root_view_draw'
        /home/rice7th/.config/pragtical/plugins/lsp/listbox.lua:519: in function 'root_view_draw'
        /home/rice7th/.bin/pragtical/data/plugins/treeview.lua:596: in function 'draw'
        /home/rice7th/.bin/pragtical/data/core/init.lua:1255: in function 'step'
        /home/rice7th/.bin/pragtical/data/core/init.lua:1344: in function 'core_run'
        /home/rice7th/.bin/pragtical/data/plugins/settings.lua:1933: in function 'core_run'
        /home/rice7th/.bin/pragtical/data/plugins/ipc.lua:851: in function 'run'
        [string "local core..."]:15: in function <[string "local core..."]:6>
        [C]: in function 'xpcall'
        [string "local core..."]:6: in main chunk

Effectively, evergreen/highlights.lua has no done variable defined, so I guess it lives somewhere else.

Using Pragtical Git, master branch.

rice7th commented 8 months ago

Another note: the plugin loads just fine, it's only when I try to open a rust file that it explodes

TorchedSammy commented 8 months ago

the latest commit should fix that.

rice7th commented 8 months ago

Thank you, I'll try the new fix right now =)