mirror of
https://github.com/LazyVim/LazyVim.git
synced 2025-06-21 16:39:06 +02:00
fix(dials): dials.nvim stopped working after making changes to plugin files
This commit is contained in:
parent
b9a8a4ad7f
commit
455557c1f6
1 changed files with 2 additions and 4 deletions
|
@ -1,6 +1,4 @@
|
|||
local M = {}
|
||||
---@type table<string, table<string, string[]>>
|
||||
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,
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue