summaryrefslogtreecommitdiff
path: root/src/method
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2018-11-19 18:32:25 +0800
committer最萌小汐 <sumneko@hotmail.com>2018-11-19 18:32:25 +0800
commita0d63aed83e365ebcbbb5306ef109b18854f7af8 (patch)
tree0760360cc2c680040feb0b19b18941cf47686193 /src/method
parentbff91f1e802c56554a2b12fa8d89561610733391 (diff)
downloadlua-language-server-a0d63aed83e365ebcbbb5306ef109b18854f7af8.zip
显示语法错误
Diffstat (limited to 'src/method')
-rw-r--r--src/method/textDocument/definition.lua5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/method/textDocument/definition.lua b/src/method/textDocument/definition.lua
index 85655af9..3a17b463 100644
--- a/src/method/textDocument/definition.lua
+++ b/src/method/textDocument/definition.lua
@@ -12,6 +12,11 @@ return function (lsp, params)
local pos = parser.calcline.position_utf8(text, params.position.line + 1, params.position.character + 1)
local suc, start, finish = matcher.definition(text, pos)
if not suc then
+ if finish then
+ log.debug(start, uri)
+ finish.lua = nil
+ log.debug(table.dump(finish))
+ end
return {}
end