diff options
Diffstat (limited to 'server/src/method')
-rw-r--r-- | server/src/method/textDocument/definition.lua | 14 | ||||
-rw-r--r-- | server/src/method/textDocument/references.lua | 2 |
2 files changed, 2 insertions, 14 deletions
diff --git a/server/src/method/textDocument/definition.lua b/server/src/method/textDocument/definition.lua index 50076c1c..d33fd739 100644 --- a/server/src/method/textDocument/definition.lua +++ b/server/src/method/textDocument/definition.lua @@ -1,15 +1,5 @@ local core = require 'core' -local function checkWorkSpaceComplete(lsp, source) - if not source:bindValue() then - return - end - if not source:bindValue():get 'cross file' then - return - end - lsp:checkWorkSpaceComplete() -end - local function findResult(lsp, params) local uri = params.textDocument.uri local vm, lines = lsp:loadVM(uri) @@ -24,9 +14,7 @@ local function findResult(lsp, params) return nil end - checkWorkSpaceComplete(lsp, source) - - local positions, isGlobal = core.definition(vm, source, lsp) + local positions, isGlobal = core.definition(vm, position, 'definition', lsp) if not positions then return nil, isGlobal end diff --git a/server/src/method/textDocument/references.lua b/server/src/method/textDocument/references.lua index 397b1491..4a876121 100644 --- a/server/src/method/textDocument/references.lua +++ b/server/src/method/textDocument/references.lua @@ -4,7 +4,7 @@ local LastTask local function findReferences(lsp, uri, position, declarat) local vm = lsp:getVM(uri) - local positions, isGlobal = core.references(vm, position, declarat) + local positions, isGlobal = core.references(vm, position, 'reference') if not positions then return nil end |