neovim (lua) to vim theme
Using neovim on older systems the performance hit it comes with compared to vim is noticeable so I tend to use vim. This comes with a number of drawbacks, one of them being that a lot of current themes are for neovim only, and in lua format at that.
To work around this I created a simple script to generate a .vim
file out
of a lua theme directory.
Want to try it out? These are the steps:
Fetch and make the conversion script executable (requires lua5.1):
$ curl -O https://pekdon.pekwm.se/files/lua_to_vim_theme.lua
$ chmod +x lua_to_vim_theme.lua
Then grab a theme, in this example the vscode theme by Mofiqul is used:
$ git clone https://github.com/Mofiqul/vscode.nvim.git
And finally, convert and save it to .vim
and place it in your colors
directory:
$ mkdir -p ~/.vim/colors
$ ./lua_to_vim_theme.lua vscode.nvim/lua/vscode > ~/.vim/colors/vscode.vim
Now, you should be able to activate the new theme from with:
:colorscheme vscode