Closed TimUntersberger closed 3 years ago
@ramirezmike @keepitsane any thoughts regarding this?
Probably a good idea I think, having a custom language would honestly most likely hurt long term adoption.
I'm cool with it. Would also decrease the amount of things that need to be maintained moving forward too.
I do think this should be something we document how to convert configs to. I don't know how many people use nog regularly (how could you not amirite?), but it'd be good to assist them move to the new format and may reduce new issues created where the resolution is just "oh whoops, you need to use the new format".
Currently working on this in https://github.com/TimUntersberger/nog/tree/lua
The PR will be merged soon, so I am closing this now.
I recently tried to do Advent Of Code in
nogscript
and holy shit the AST based interpreter is really slow. Right now we might not notice the performance problems, but someone in the future might want to implement a more performance heavy plugin which won't be possible, because the interpreter is so slow (This is also important for being able to write a custom layout manager in the config)Now we have a few options:
luajit
(like neovim)To be honest I don't want to do the first option, because of the time required to do this properly.
I played a bit with how a lua config could look like and this is my current result:
Experimentations:
nog.workspace.swap
I now namespace the functions themselves like thisws_swap
(ws_
for workspace andwin_
for window)nog
object is now a global so you don't have to import it everytime you want to use itbind
function I now just have separate functions for each mode likenbind
bar.configure
andworkspace.configure
are removed. Instead you now just modify the config itself (Just like you would in rust basically)As for lua bindings I would like to use mlua.