From 455557c1f693c6ced946de2322beceb555161417 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Wed, 3 Jul 2024 19:06:43 +0200 Subject: [PATCH] fix(dials): dials.nvim stopped working after making changes to plugin files --- lua/lazyvim/plugins/extras/editor/dial.lua | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lua/lazyvim/plugins/extras/editor/dial.lua b/lua/lazyvim/plugins/extras/editor/dial.lua index cc262a33..dbc6cdf0 100644 --- a/lua/lazyvim/plugins/extras/editor/dial.lua +++ b/lua/lazyvim/plugins/extras/editor/dial.lua @@ -1,6 +1,4 @@ local M = {} ----@type table> -M.dials_by_ft = {} ---@param increment boolean ---@param g? boolean @@ -9,7 +7,7 @@ function M.dial(increment, g) -- Use visual commands for VISUAL 'v', VISUAL LINE 'V' and VISUAL BLOCK '\22' local is_visual = mode == "v" or mode == "V" or mode == "\22" local func = (increment and "inc" or "dec") .. (g and "_g" or "_") .. (is_visual and "visual" or "normal") - local group = M.dials_by_ft[vim.bo.filetype] or "default" + local group = vim.g.dials_by_ft[vim.bo.filetype] or "default" return require("dial.map")[func](group) end @@ -170,6 +168,6 @@ return { end, config = function(_, opts) require("dial.config").augends:register_group(opts.groups) - M.dials_by_ft = opts.dials_by_ft + vim.g.dials_by_ft = opts.dials_by_ft end, }