Skip to content

Commit

Permalink
fix: don't eagerly load current scope on setup
Browse files Browse the repository at this point in the history
  • Loading branch information
cbochs committed Mar 21, 2024
1 parent b381b69 commit b2b0586
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 15 deletions.
5 changes: 0 additions & 5 deletions lua/grapple.lua
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,6 @@ function Grapple.setup(opts)
if err then
return vim.notify(err, vim.log.levels.ERROR)
end

local err = app:load_current_scope()
if err then
return vim.notify(err, vim.log.levels.ERROR)
end
end

---@class grapple.options
Expand Down
10 changes: 0 additions & 10 deletions lua/grapple/app.lua
Original file line number Diff line number Diff line change
Expand Up @@ -84,16 +84,6 @@ function App:delete_scope(scope_name)
return self.scope_manager:delete(scope_name)
end

---@return string? error
function App:load_current_scope()
local scope, err = self:current_scope()
if not scope then
return err
end

self.tag_manager:load(scope.id)
end

---@return grapple.resolved_scope | nil, string? error
function App:current_scope()
return self.scope_manager:get_resolved(self.settings.scope)
Expand Down

0 comments on commit b2b0586

Please sign in to comment.