Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request textDocument/hover failed #346

Closed
synhi opened this issue Jan 7, 2021 · 0 comments
Closed

Request textDocument/hover failed #346

synhi opened this issue Jan 7, 2021 · 0 comments
Labels
bug Something isn't working

Comments

@synhi
Copy link

synhi commented Jan 7, 2021

win10 x64 2016ltsb
vscode 1.52.1 官方便携版
插件 1.11.1 最新版

require 引入的任何包都无法跳转,鼠标悬停在包名上就会报错
下面为了排除其它文件的影响,我新建了一个只有一个 lua 文件的目录测试

补充:如果我提前按下 ctrl 然后直接点击包名,在悬停提示出来之前是可以正常跳转到包文件的
如果悬停提示出来了,就一定会报错,我尝试在配置文件中关闭悬停提示,但是并未生效
image

测试代码

image

Request textDocument/hover failed.
  Message: [09:43:31.672][error][#0:script.core.hover.description:31]: ...extensions/sumneko.lua-1.11.1/server/script/file-uri.lua:70: attempt to index a nil value (local 'uri')
stack traceback:
	...neko.lua-1.11.1/server/script/core\hover\description.lua:31: in upvalue 'asStringInRequire'
	...neko.lua-1.11.1/server/script/core\hover\description.lua:77: in function <...neko.lua-1.11.1/server/script/core\hover\description.lua:72>
	(...tail calls...)
	...ons/sumneko.lua-1.11.1/server/script/core\hover/init.lua:96: in function <...ons/sumneko.lua-1.11.1/server/script/core\hover/init.lua:91>
	(...tail calls...)
	...ons/sumneko.lua-1.11.1/server/script/core\hover/init.lua:158: in function 'core.hover.byUri'
	...s/sumneko.lua-1.11.1/server/script/provider\provider.lua:208: in function <...s/sumneko.lua-1.11.1/server/script/provider\provider.lua:196>
	[C]: in function 'xpcall'
	...ensions/sumneko.lua-1.11.1/server/script/proto\proto.lua:124: in function <...ensions/sumneko.lua-1.11.1/server/script/proto\proto.lua:103>

  Code: -32603 
[Error - 上午9:44:11] Request textDocument/hover failed.
  Message: [09:44:10.704][error][#0:script.core.hover.description:31]: ...extensions/sumneko.lua-1.11.1/server/script/file-uri.lua:70: attempt to index a nil value (local 'uri')
stack traceback:
	...neko.lua-1.11.1/server/script/core\hover\description.lua:31: in upvalue 'asStringInRequire'
	...neko.lua-1.11.1/server/script/core\hover\description.lua:77: in function <...neko.lua-1.11.1/server/script/core\hover\description.lua:72>
	(...tail calls...)
	...ons/sumneko.lua-1.11.1/server/script/core\hover/init.lua:96: in function <...ons/sumneko.lua-1.11.1/server/script/core\hover/init.lua:91>
	(...tail calls...)
	...ons/sumneko.lua-1.11.1/server/script/core\hover/init.lua:158: in function 'core.hover.byUri'
	...s/sumneko.lua-1.11.1/server/script/provider\provider.lua:208: in function <...s/sumneko.lua-1.11.1/server/script/provider\provider.lua:196>
	[C]: in function 'xpcall'
	...ensions/sumneko.lua-1.11.1/server/script/proto\proto.lua:124: in function <...ensions/sumneko.lua-1.11.1/server/script/proto\proto.lua:103>

  Code: -32603 
[Error - 上午9:44:11] Request textDocument/hover failed.
  Message: [09:44:11.000][error][#0:script.core.hover.description:31]: ...extensions/sumneko.lua-1.11.1/server/script/file-uri.lua:70: attempt to index a nil value (local 'uri')
stack traceback:
	...neko.lua-1.11.1/server/script/core\hover\description.lua:31: in upvalue 'asStringInRequire'
	...neko.lua-1.11.1/server/script/core\hover\description.lua:77: in function <...neko.lua-1.11.1/server/script/core\hover\description.lua:72>
	(...tail calls...)
	...ons/sumneko.lua-1.11.1/server/script/core\hover/init.lua:96: in function <...ons/sumneko.lua-1.11.1/server/script/core\hover/init.lua:91>
	(...tail calls...)
	...ons/sumneko.lua-1.11.1/server/script/core\hover/init.lua:158: in function 'core.hover.byUri'
	...s/sumneko.lua-1.11.1/server/script/provider\provider.lua:208: in function <...s/sumneko.lua-1.11.1/server/script/provider\provider.lua:196>
	[C]: in function 'xpcall'
	...ensions/sumneko.lua-1.11.1/server/script/proto\proto.lua:124: in function <...ensions/sumneko.lua-1.11.1/server/script/proto\proto.lua:103>

  Code: -32603
@sumneko sumneko added the bug Something isn't working label Jan 7, 2021
@sumneko sumneko closed this as completed in 837b139 Jan 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants