diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2021-09-23 15:00:50 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2021-09-23 15:00:50 +0800 |
commit | 5c9b1b467af1636ea21a9bd3d398e220790eea54 (patch) | |
tree | 8a834bcb5e9c8e6c32f118c23fbeafcaf01630ab /script/core/semantic-tokens.lua | |
parent | 0a60aa17c240d4fb080b091891f659a9d74aeffd (diff) | |
download | lua-language-server-5c9b1b467af1636ea21a9bd3d398e220790eea54.zip |
cleanup
Diffstat (limited to 'script/core/semantic-tokens.lua')
-rw-r--r-- | script/core/semantic-tokens.lua | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/script/core/semantic-tokens.lua b/script/core/semantic-tokens.lua index 238df862..405f2735 100644 --- a/script/core/semantic-tokens.lua +++ b/script/core/semantic-tokens.lua @@ -5,6 +5,7 @@ local define = require 'proto.define' local vm = require 'vm' local util = require 'utility' local guide = require 'parser.guide' +local converter = require 'proto.converter' local Care = {} Care['setglobal'] = function (source, results) @@ -188,8 +189,8 @@ local function buildTokens(uri, results) local lastLine = 0 local lastStartChar = 0 for i, source in ipairs(results) do - local startPos = files.position(uri, source.start, 'left') - local finishPos = files.position(uri, source.finish, 'right') + local startPos = converter.packPosition(uri, source.start) + local finishPos = converter.packPosition(uri, source.finish) local line = startPos.line local startChar = startPos.character local deltaLine = line - lastLine |