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/definition.lua | |
parent | c44cdf61136a639138a8bcd69bdcd37432ea63db (diff) | |
download | lua-language-server-12d025b1485ab541fa629af7545e0f2596a6d562.zip |
跨文件也要模糊搜索
Diffstat (limited to 'server/src/method/textDocument/definition.lua')
-rw-r--r-- | server/src/method/textDocument/definition.lua | 4 |
1 files changed, 2 insertions, 2 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 |