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

Error upon every action if file isn't .lua #719

Closed
Nixill opened this issue Oct 10, 2021 · 1 comment
Closed

Error upon every action if file isn't .lua #719

Nixill opened this issue Oct 10, 2021 · 1 comment
Labels
bug Something isn't working

Comments

@Nixill
Copy link

Nixill commented Oct 10, 2021

Describe the bug
If a file isn't a .lua file, but has its language set to (or detected as) Lua anyway, an error occurs every single time any action is taken in that file (scroll, type one key, click anywhere, etc).

To Reproduce
Steps to reproduce the behavior:

  1. Create a file with the extension .txt
  2. Manually set the file's language to Lua
  3. Do literally anything
  4. Error pops up

Expected behavior
Expected behavior is syntax highlighting and some autocompletion features.

Environment (please complete the following information):

  • OS: Windows
  • Is WSL remote? (no)
  • Client: VSCode Insiders

Provide logs

[16:33:05.349][debug][#0:c:\Users\Nixill\.vscode-insiders\extensions\sumneko.lua-2.4.2\server/script/provider\provider.lua:165]: didOpen	file:///c%3A/Users/Nixill/Programs/Synchrony/Synchrony/components-41.2.txt
[16:33:05.349][debug][#0:c:\Users\Nixill\.vscode-insiders\extensions\sumneko.lua-2.4.2\server/script/proto\proto.lua:135]: Method [textDocument/documentSymbol] takes [0.812]sec.
[16:33:05.349][debug][#0:c:\Users\Nixill\.vscode-insiders\extensions\sumneko.lua-2.4.2\server/script/proto\proto.lua:135]: Method [textDocument/semanticTokens/range] takes [0.806]sec.
[16:33:05.349][debug][#0:c:\Users\Nixill\.vscode-insiders\extensions\sumneko.lua-2.4.2\server/script/proto\proto.lua:135]: Method [textDocument/semanticTokens/range] takes [0.641]sec.
[16:33:06.349][debug][#0:c:\Users\Nixill\.vscode-insiders\extensions\sumneko.lua-2.4.2\server/script/proto\proto.lua:135]: Method [textDocument/didOpen] takes [1.814]sec.
[16:33:08.521][debug][#0:c:\Users\Nixill\.vscode-insiders\extensions\sumneko.lua-2.4.2\server/script/provider\diagnostic.lua:358]: 全文诊断耗时:	1.166
[16:33:12.021][error][#0:c:\Users\Nixill\.vscode-insiders\extensions\sumneko.lua-2.4.2\server/script/proto\converter.lua:131]: ...ions\sumneko.lua-2.4.2\server/script/proto\converter.lua:69: attempt to index a nil value (local 'state')
stack traceback:
	...ions\sumneko.lua-2.4.2\server/script/proto\converter.lua:131: in function 'proto.converter.unpackRange'
	...ns\sumneko.lua-2.4.2\server/script/provider\provider.lua:617: in function <...ns\sumneko.lua-2.4.2\server/script/provider\provider.lua:608>
	[C]: in function 'xpcall'
	...tensions\sumneko.lua-2.4.2\server/script/proto\proto.lua:148: in function <...tensions\sumneko.lua-2.4.2\server/script/proto\proto.lua:123>
[16:33:12.834][error][#0:c:\Users\Nixill\.vscode-insiders\extensions\sumneko.lua-2.4.2\server/script/proto\converter.lua:132]: ...ions\sumneko.lua-2.4.2\server/script/proto\converter.lua:69: attempt to index a nil value (local 'state')
stack traceback:
	...ions\sumneko.lua-2.4.2\server/script/proto\converter.lua:132: in function 'proto.converter.unpackRange'
	...ns\sumneko.lua-2.4.2\server/script/provider\provider.lua:711: in function <...ns\sumneko.lua-2.4.2\server/script/provider\provider.lua:699>
	[C]: in function 'xpcall'
	...tensions\sumneko.lua-2.4.2\server/script/proto\proto.lua:148: in function <...tensions\sumneko.lua-2.4.2\server/script/proto\proto.lua:123>
[16:33:12.990][error][#0:c:\Users\Nixill\.vscode-insiders\extensions\sumneko.lua-2.4.2\server/script/proto\converter.lua:131]: ...ions\sumneko.lua-2.4.2\server/script/proto\converter.lua:69: attempt to index a nil value (local 'state')
stack traceback:
	...ions\sumneko.lua-2.4.2\server/script/proto\converter.lua:131: in function 'proto.converter.unpackRange'
	...ns\sumneko.lua-2.4.2\server/script/provider\provider.lua:617: in function <...ns\sumneko.lua-2.4.2\server/script/provider\provider.lua:608>
	[C]: in function 'xpcall'
	...tensions\sumneko.lua-2.4.2\server/script/proto\proto.lua:148: in function <...tensions\sumneko.lua-2.4.2\server/script/proto\proto.lua:123>
[16:33:14.849][error][#0:c:\Users\Nixill\.vscode-insiders\extensions\sumneko.lua-2.4.2\server/script/proto\converter.lua:132]: ...ions\sumneko.lua-2.4.2\server/script/proto\converter.lua:69: attempt to index a nil value (local 'state')
stack traceback:
	...ions\sumneko.lua-2.4.2\server/script/proto\converter.lua:132: in function 'proto.converter.unpackRange'
	...ns\sumneko.lua-2.4.2\server/script/provider\provider.lua:711: in function <...ns\sumneko.lua-2.4.2\server/script/provider\provider.lua:699>
	[C]: in function 'xpcall'
	...tensions\sumneko.lua-2.4.2\server/script/proto\proto.lua:148: in function <...tensions\sumneko.lua-2.4.2\server/script/proto\proto.lua:123>
@ChrisKader
Copy link

This happens even if the file or the directory of the file is ignored in the extensions settings. The only way to stop these errors on a specific file is to change the Language mode of the file.

@sumneko sumneko added the bug Something isn't working label Oct 11, 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

3 participants