refactor(runtime): rewrite 'vim' color scheme in Lua

Problem: Bundled 'vim' color scheme is written in Vimscript which
  implicitly assumes that the file is ported from Vim.
  This is not the case, at it is currently the Neovim's way of providing
  backward compatibility for color schemes.

Solution: Rewrite it in Lua to indicate that this runtime file comes
  from Neovim.
This commit is contained in:
Evgeni Chasnovski
2023-12-19 18:20:03 +02:00
committed by Christian Clason
parent 8533adb484
commit 720a3518e3
4 changed files with 288 additions and 270 deletions

View File

@@ -41,7 +41,7 @@ module.nvim_argv = {
-- Make screentest work after changing to the new default color scheme
-- Source 'vim' color scheme without side effects
-- TODO: rewrite tests
'--cmd', 'lua f=io.open("runtime/colors/vim.vim", "r"); l=f:read("*a"); f:close(); vim.api.nvim_exec2(l, {})',
'--cmd', 'lua dofile("runtime/colors/vim.lua")',
'--cmd', 'unlet g:colors_name',
'--embed'}