Closed mcepl closed 1 year ago
Hmm, so it is not complete yet. On the start of the editor I get immediately:
/home/matej/.config/vis/plugins/vis-toggler/init.lua:11: attempt to index a nil value (loc
al 'l')
(vis-toggler
is obviously https://repo.or.cz/vis-toggler.git or from my clone of the repo on https://git.sr.ht/~mcepl/vis-toggler).
For one thing it looks like a change from upstream to lexer.lua
needs to be added here:
diff --git a/lua/plugins/filetype.lua b/lua/plugins/filetype.lua
index ede9fd4..b35551d 100644
--- a/lua/plugins/filetype.lua
+++ b/lua/plugins/filetype.lua
@@ -497,7 +497,7 @@ vis.events.subscribe(vis.events.WIN_OPEN, function(win)
for _, cmd in pairs(filetype.cmd or {}) do
vis:command(cmd)
end
- local path = vis.lexers.property['lexer.lpeg.home']:gsub(';', '/?.lua;') .. '/?.lua'
+ local path = vis.lexers.property['scintillua.lexers']:gsub(';', '/?.lua;') .. '/?.lua'
Some logic in vis.lua needs to be updated because the lexer table contents were overhauled.
Table contents dumped when opening vis.c
:
For one thing it looks like a change from upstream to
lexer.lua
needs to be added here:diff --git a/lua/plugins/filetype.lua b/lua/plugins/filetype.lua index ede9fd4..b35551d 100644 --- a/lua/plugins/filetype.lua +++ b/lua/plugins/filetype.lua @@ -497,7 +497,7 @@ vis.events.subscribe(vis.events.WIN_OPEN, function(win) for _, cmd in pairs(filetype.cmd or {}) do vis:command(cmd) end - local path = vis.lexers.property['lexer.lpeg.home']:gsub(';', '/?.lua;') .. '/?.lua' + local path = vis.lexers.property['scintillua.lexers']:gsub(';', '/?.lua;') .. '/?.lua'
Unfortunately, it is not enough, I am afraid. The result is still broken. I guess we broke something fundamental about require()
?
I really didn’t want to close it. Not sure how I have managed to do it.
@rnpnr Not sure whether I should ask you to reopen this one, or whether I should try again with the new tag scintillua_6.2.
I can't actually reopen this one since you deleted your github fork of vis. However a new version based on Scintillua 6.2 would be very appreciated.
I will probably split it into multiple submissions and send to https://lists.sr.ht/~martanne/devel
Sounds good to me.
To answer your upstream question (https://github.com/orbitalquark/scintillua/issues/87#issuecomment-1446540510), based on:
Table contents dumped when opening
vis.c
:
It looks like replacing _TOKENSTYLES
with _TAGS
might be
sufficient. Otherwise some of the logic in vis.lua
will need to
be updated.
https://github.com/martanne/vis/pull/1018 has been fantastic achievement, but it was done against a bit older commit of https://github.com/orbitalquark/scintillua. This PR tries to sync
lexers/
directory to the same code as is the latest upstream tag https://github.com/orbitalquark/scintillua/releases/tag/scintillua_6.1.Please, review, I am not sure how well I have to managed to do the merge.
Cc: @ninewise @Nomarian @qiu-x @jpe90 @deepcube @martanne @orbitalquark