Skip to content

Commit

Permalink
fix: return early if rock is found in cache
Browse files Browse the repository at this point in the history
mrcjkb committed Jun 17, 2024
1 parent 99916f1 commit 7540153
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lua/rocks_treesitter/highlight.lua
Original file line number Diff line number Diff line change
@@ -41,7 +41,7 @@ local function find_parser_rock(lang, callback)
local rock_name = "tree-sitter-" .. lang
local rocks = api.try_get_cached_rocks()
if rocks and rocks[rock_name] then
callback(rocks[rock_name])
return callback(rocks[rock_name])
end
-- Cache may not have been populated. Query luarocks.
api.query_luarocks_rocks(function(luarocks_rocks)

0 comments on commit 7540153

Please sign in to comment.