diff options
author | uhziel <uhziel@gmail.com> | 2021-01-04 15:59:39 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-04 15:59:39 +0800 |
commit | 525f551abc533b704906fd3a5cb84404fb5cf4de (patch) | |
tree | 71e065e94873a86f53bee9886e1c8a39c1b663f8 /script/core/semantic-tokens.lua | |
parent | c57556e25cb02e01011272c305854d0f1c106e1c (diff) | |
parent | 7a63f98e41305e8deb114164e86a621881a5a2bc (diff) | |
download | lua-language-server-525f551abc533b704906fd3a5cb84404fb5cf4de.zip |
Merge branch 'master' into doc-type-table
Diffstat (limited to 'script/core/semantic-tokens.lua')
-rw-r--r-- | script/core/semantic-tokens.lua | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/script/core/semantic-tokens.lua b/script/core/semantic-tokens.lua index 37eabda7..1c59d80d 100644 --- a/script/core/semantic-tokens.lua +++ b/script/core/semantic-tokens.lua @@ -187,6 +187,16 @@ return function (uri, start, finish) end end) + for _, comm in ipairs(ast.comms) do + if comm.semantic then + results[#results+1] = { + start = comm.start, + finish = comm.finish, + type = define.TokenTypes.comment, + } + end + end + table.sort(results, function (a, b) return a.start < b.start end) |