Skip to content
Merged
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: 8 additions & 0 deletions script/core/semantic-tokens.lua
Original file line number Diff line number Diff line change
Expand Up @@ -882,6 +882,10 @@ return function (uri, start, finish)

local n = 0
guide.eachSourceBetween(state.ast, start, finish, function (source) ---@async
-- skip virtual source
if source.virtual then
return
end
Care(source.type, source, options, results)
n = n + 1
if n % 100 == 0 then
Expand All @@ -890,6 +894,10 @@ return function (uri, start, finish)
end)

for _, comm in ipairs(state.comms) do
-- skip virtual comment
if comm.virtual then
return
end
if start <= comm.start and comm.finish <= finish then
local headPos = (comm.type == 'comment.short' and comm.text:match '^%-%s*[@|]()')
or (comm.type == 'comment.long' and comm.text:match '^@()')
Expand Down