Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions lua/snacks/indent.lua
Original file line number Diff line number Diff line change
Expand Up @@ -506,9 +506,11 @@ function M.enable()
})

-- Listen for scope changes
scopes = scopes or Snacks.scope.attach(M.on_scope, config.scope)
if not scopes.enabled then
scopes:enable()
if config.scope.enabled then
scopes = scopes or Snacks.scope.attach(M.on_scope, config.scope)
if not scopes.enabled then
scopes:enable()
end
end

local group = vim.api.nvim_create_augroup("snacks_indent", { clear = true })
Expand Down