From 8f0f1de6bce63b1bd9b64dc683f906c8b32c595d Mon Sep 17 00:00:00 2001 From: Price Hiller Date: Sat, 24 Feb 2024 16:03:49 -0600 Subject: [PATCH] feat(nvim): update lua run keybind to support ranges, unsaved files --- dots/.config/nvim/ftplugin/lua.lua | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/dots/.config/nvim/ftplugin/lua.lua b/dots/.config/nvim/ftplugin/lua.lua index 56ed27ed..bb550458 100644 --- a/dots/.config/nvim/ftplugin/lua.lua +++ b/dots/.config/nvim/ftplugin/lua.lua @@ -2,7 +2,12 @@ vim.opt_local.tabstop = 4 vim.opt_local.shiftwidth = 4 vim.opt_local.expandtab = true -vim.keymap.set("n", "fr", ":luafile %", { +vim.keymap.set("n", "fr", ":%lua", { + buffer = true, + silent = true, +}) + +vim.keymap.set("v", "fr", ":lua", { buffer = true, silent = true, })