From 9788b81d7e53e7ad1ca9db249d86e43426ce56c2 Mon Sep 17 00:00:00 2001 From: Christian Clason Date: Sat, 5 Oct 2024 13:11:16 +0200 Subject: [PATCH] fix(runtime): fully port emoji_list to Lua Problem: `runtime/tools/emoji_list.vim` is a Lua script masquerading as Vimscript, which is unnecessary now that `:source` works for Lua files. Solution: Remove Vimscript wrapper. --- runtime/doc/builtin.txt | 2 +- runtime/lua/vim/_meta/vimfn.lua | 2 +- runtime/tools/emoji_list.lua | 19 +++++++++++++++++++ runtime/tools/emoji_list.vim | 21 --------------------- src/nvim/eval.lua | 2 +- 5 files changed, 22 insertions(+), 24 deletions(-) create mode 100644 runtime/tools/emoji_list.lua delete mode 100644 runtime/tools/emoji_list.vim diff --git a/runtime/doc/builtin.txt b/runtime/doc/builtin.txt index d76cf96762..fe186466e9 100644 --- a/runtime/doc/builtin.txt +++ b/runtime/doc/builtin.txt @@ -6627,7 +6627,7 @@ setcellwidths({list}) *setcellwidths()* To clear the overrides pass an empty {list}: >vim call setcellwidths([]) -< You can use the script $VIMRUNTIME/tools/emoji_list.vim to see +< You can use the script $VIMRUNTIME/tools/emoji_list.lua to see the effect for known emoji characters. Move the cursor through the text to check if the cell widths of your terminal match with what Vim knows about each emoji. If it doesn't diff --git a/runtime/lua/vim/_meta/vimfn.lua b/runtime/lua/vim/_meta/vimfn.lua index 649805f447..3eb2f2382d 100644 --- a/runtime/lua/vim/_meta/vimfn.lua +++ b/runtime/lua/vim/_meta/vimfn.lua @@ -7904,7 +7904,7 @@ function vim.fn.setbufvar(buf, varname, val) end --- To clear the overrides pass an empty {list}: >vim --- call setcellwidths([]) --- ---- vim call setcellwidths([]) -