Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(meta): fix treesitter deprecation warning (#1104) #1130

Merged
merged 1 commit into from
Oct 29, 2023
Merged
Show file tree
Hide file tree
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
6 changes: 3 additions & 3 deletions lua/neorg/modules/core/esupports/metagen/module.lua
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ module.public = {

local meta_root = nil

languagetree:for_each_child(function(tree)
for _, tree in pairs(languagetree:children()) do
if tree:lang() ~= "norg_meta" or meta_root then
return
end
Expand All @@ -257,7 +257,7 @@ module.public = {
end

meta_root = meta_tree:root()
end)
end

if not meta_root then
return
Expand Down Expand Up @@ -375,4 +375,4 @@ module.events.subscribed = {
},
}

return module
return module
6 changes: 3 additions & 3 deletions lua/neorg/modules/core/integrations/treesitter/module.lua
Original file line number Diff line number Diff line change
Expand Up @@ -576,7 +576,7 @@ module.public = {

local result = {}

languagetree:for_each_child(function(tree)
for _, tree in ipairs(languagetree:children()) do
if tree:lang() ~= "norg_meta" then
return
end
Expand Down Expand Up @@ -661,7 +661,7 @@ module.public = {
)
end
end
end)
end

return result
end,
Expand Down Expand Up @@ -768,4 +768,4 @@ module.events.subscribed = {
},
}

return module
return module
Loading