mirror of
https://github.com/LazyVim/LazyVim.git
synced 2026-07-25 14:01:06 +00:00
fix(extras): early return for dial extra
This commit is contained in:
parent
b5208c489e
commit
e99eca3a9d
1 changed files with 5 additions and 4 deletions
|
|
@ -178,6 +178,7 @@ return {
|
|||
end
|
||||
|
||||
local dial_augroup = vim.api.nvim_create_augroup("DialFileType", { clear = true })
|
||||
local is_current_buffer_has_group = false
|
||||
|
||||
for lang, patterns in pairs(opts.groups_by_filetypes) do
|
||||
vim.api.nvim_create_autocmd("FileType", {
|
||||
|
|
@ -193,12 +194,12 @@ return {
|
|||
vim.notify(pattern .. " in " .. vim.inspect(patterns) .. ". Current filetype: " .. vim.bo.filetype)
|
||||
if vim.bo.filetype == pattern then
|
||||
set_dial_group(lang)
|
||||
return
|
||||
is_current_buffer_has_group = true
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
-- if we haven't returned from function that means that we are in filetype without mappings
|
||||
if not is_current_buffer_has_group then
|
||||
set_dial_group("default")
|
||||
end
|
||||
end,
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue