diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2019-01-16 15:00:15 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2019-01-16 15:00:15 +0800 |
commit | 12d025b1485ab541fa629af7545e0f2596a6d562 (patch) | |
tree | 6a8e24b1f37e8f5ff86634e94ba0f2036d0e562d /server/src/method/textDocument | |
parent | c44cdf61136a639138a8bcd69bdcd37432ea63db (diff) | |
download | lua-language-server-12d025b1485ab541fa629af7545e0f2596a6d562.zip |
跨文件也要模糊搜索
Diffstat (limited to 'server/src/method/textDocument')
-rw-r--r-- | server/src/method/textDocument/definition.lua | 4 | ||||
-rw-r--r-- | server/src/method/textDocument/implementation.lua | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/server/src/method/textDocument/definition.lua b/server/src/method/textDocument/definition.lua index a9f92631..17351318 100644 --- a/server/src/method/textDocument/definition.lua +++ b/server/src/method/textDocument/definition.lua @@ -24,14 +24,14 @@ return function (lsp, params) end -- lua是从1开始的,因此都要+1 local position = lines:position(params.position.line + 1, params.position.character + 1) - local result = core.findResult(vm, position) + local result = core.findResult(vm, position, lsp) if not result then return nil end checkWorkSpaceComplete(lsp, result) - local positions = core.definition(vm, result) + local positions = core.definition(vm, result, lsp) if not positions then return nil end diff --git a/server/src/method/textDocument/implementation.lua b/server/src/method/textDocument/implementation.lua index df6f027b..7117aba1 100644 --- a/server/src/method/textDocument/implementation.lua +++ b/server/src/method/textDocument/implementation.lua @@ -28,7 +28,7 @@ return function (lsp, params) checkWorkSpaceComplete(lsp, result) - local positions = core.implementation(vm, result) + local positions = core.implementation(vm, result, lsp) if not positions then return nil end |