summaryrefslogtreecommitdiff
path: root/script-beta/provider
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2020-09-09 15:03:49 +0800
committer最萌小汐 <sumneko@hotmail.com>2020-09-09 15:03:49 +0800
commit9d82d866468c0a33c153a3d40d118b4ae7cb2689 (patch)
treeecc9c04dd6a7a4fa3696de44631d6b3a6a3d65af /script-beta/provider
parent348aca7e6ad18acea7526daf847a9b03c5bbf807 (diff)
downloadlua-language-server-9d82d866468c0a33c153a3d40d118b4ae7cb2689.zip
都要用 offsetOfWord
Diffstat (limited to 'script-beta/provider')
-rw-r--r--script-beta/provider/provider.lua10
1 files changed, 5 insertions, 5 deletions
diff --git a/script-beta/provider/provider.lua b/script-beta/provider/provider.lua
index 410410c2..1360fe12 100644
--- a/script-beta/provider/provider.lua
+++ b/script-beta/provider/provider.lua
@@ -156,7 +156,7 @@ proto.on('textDocument/hover', function (params)
end
local lines = files.getLines(uri)
local text = files.getText(uri)
- local offset = define.offset(lines, text, params.position)
+ local offset = define.offsetOfWord(lines, text, params.position)
local hover = core.byUri(uri, offset)
if not hover then
return nil
@@ -181,7 +181,7 @@ proto.on('textDocument/definition', function (params)
end
local lines = files.getLines(uri)
local text = files.getText(uri)
- local offset = define.offset(lines, text, params.position)
+ local offset = define.offsetOfWord(lines, text, params.position)
local result = core(uri, offset)
if not result then
return nil
@@ -210,7 +210,7 @@ proto.on('textDocument/references', function (params)
end
local lines = files.getLines(uri)
local text = files.getText(uri)
- local offset = define.offset(lines, text, params.position)
+ local offset = define.offsetOfWord(lines, text, params.position)
local result = core(uri, offset)
if not result then
return nil
@@ -235,7 +235,7 @@ proto.on('textDocument/documentHighlight', function (params)
end
local lines = files.getLines(uri)
local text = files.getText(uri)
- local offset = define.offset(lines, text, params.position)
+ local offset = define.offsetOfWord(lines, text, params.position)
local result = core(uri, offset)
if not result then
return nil
@@ -287,7 +287,7 @@ proto.on('textDocument/prepareRename', function (params)
end
local lines = files.getLines(uri)
local text = files.getText(uri)
- local offset = define.offset(lines, text, params.position)
+ local offset = define.offsetOfWord(lines, text, params.position)
local result = core.prepareRename(uri, offset)
if not result then
return nil