Skip to content

Commit 1e7ffdd

Browse files
committed
feat: emit event on scope change "GrappleScopeChanged" (See #147)
1 parent 6185e4e commit 1e7ffdd

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lua/grapple.lua

+6
Original file line numberDiff line numberDiff line change
@@ -524,6 +524,12 @@ function Grapple.use_scope(scope_name)
524524

525525
if scope.name ~= app.settings.scope then
526526
app.settings:update({ scope = scope.name })
527+
528+
vim.api.nvim_exec_autocmds("User", {
529+
pattern = "GrappleScopeChanged",
530+
modeline = false,
531+
})
532+
527533
vim.notify(string.format("Changing scope: %s", scope.name))
528534
end
529535
end

0 commit comments

Comments
 (0)