diff options
Diffstat (limited to 'server-beta/src/proto/provider.lua')
-rw-r--r-- | server-beta/src/proto/provider.lua | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/server-beta/src/proto/provider.lua b/server-beta/src/proto/provider.lua index 9ad5147a..a27066aa 100644 --- a/server-beta/src/proto/provider.lua +++ b/server-beta/src/proto/provider.lua @@ -150,14 +150,13 @@ end) proto.on('textDocument/definition', function (params) local core = require 'core.definition' local uri = params.textDocument.uri - local ast = files.getAst(uri) - if not ast then + if not files.exists(uri) then return nil end local lines = files.getLines(uri) local text = files.getText(uri) local offset = inte.offset(lines, text, params.position) - local result = core(ast, offset) + local result = core(uri, offset) if not result then return nil end |