Skip to content

Commit

Permalink
fix(vim): loadstring (5.1) vs load (5.2>=) (#375)
Browse files Browse the repository at this point in the history
  • Loading branch information
EdenEast authored Sep 20, 2023
1 parent 3825190 commit 4ab4dda
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 13 deletions.
30 changes: 24 additions & 6 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 8 additions & 6 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,14 @@
inputs.flake-utils.lib.eachDefaultSystem (system:
let
pkgs = nixpkgs.legacyPackages."${system}";
lua = pkgs.lua5_1;
# lua = pkgs.lua5_2;
# lua = pkgs.lua5_3;
# lua = pkgs.lua5_4;
# lua = pkgs.luajit;

vim-lua = pkgs.vim_configurable.override {
inherit lua;
luaSupport = true;
};

Expand All @@ -23,12 +29,8 @@
pandoc
gnumake
stylua
vim-lua
# luajit
lua5_4
# lua5_3
# lua5_2
# lua5_1
# vim-lua
# lua
];
};

Expand Down
2 changes: 1 addition & 1 deletion lua/nightfox/lib/vim/compiler.lua
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ set background=%s]=],

file = io.open(output_file, "wb")

local ld = load or loadstring -- loadstring == 5.1, load >= 5.2
local ld = loadstring or load -- loadstring == 5.1, load >= 5.2
local f = ld(table.concat(lines, "\n"), "=")
if not f then
local tmpfile = util.join_paths(util.get_tmp_dir(), "nightfox_error.lua")
Expand Down

0 comments on commit 4ab4dda

Please sign in to comment.