Giter VIP home page Giter VIP logo

lua-language-server's Introduction

lua-language-server

build Version (including pre-releases) Installs Downloads

Lua development just got a whole lot better ๐Ÿง 

The Lua language server provides various language features for Lua to make development easier and faster. With nearly a million installs in Visual Studio Code, it is the most popular extension for Lua language support.

See our website for more info.

Features

Install

The language server can be installed for use in Visual Studio Code, NeoVim, and any other clients that support the Language Server Protocol.

See installation instructions on our website.

Install in VS Code Install for NeoVim Other

Community Install Methods

The install methods below are maintained by community members.

asdf plugin

Links

If you find any mistakes, please report it or open a pull request if you have a fix of your own โค๏ธ

ๅฆ‚ๆžœไฝ ๅ‘็Žฐไบ†ไปปไฝ•้”™่ฏฏ๏ผŒ่ฏทๅ‘Š่ฏ‰ๆˆ‘ๆˆ–ไฝฟ็”จPull Requestsๆฅ็›ดๆŽฅไฟฎๅคใ€‚โค๏ธ

Available Languages

  • en-us ๐Ÿ‡บ๐Ÿ‡ธ
  • zh-cn ๐Ÿ‡จ๐Ÿ‡ณ
  • zh-tw ๐Ÿ‡น๐Ÿ‡ผ
  • pt-br ๐Ÿ‡ง๐Ÿ‡ท

Note All translations are provided and collaborated on by the community. If you find an inappropriate or harmful translation, please report it immediately.

Are you able to provide a translation? It would be greatly appreciated!

Thank you to all contributors of translations!

Privacy

The language server had opt-in telemetry that collected usage data and sent it to the development team to help improve the extension. Read our privacy policy to learn more. Telemetry was removed in v3.6.5 and is no longer part of the language server.

Contributors

GitHub Contributors Image

Credit

Software that the language server (or the development of it) uses:

lua-language-server's People

Contributors

9999years avatar actboy168 avatar alexcai2019 avatar alwosp avatar andreasmatthias avatar andreawalchshoferscch avatar arcanoxdragon avatar artistarthur avatar bilal2453 avatar c3pa avatar carsakiller avatar cassolette avatar cppcxy avatar cr4xy avatar emmericp avatar evan361425 avatar fesily avatar flrgh avatar gowa2017 avatar hahn-kev avatar kevinhwang91 avatar numtostr avatar salavatr avatar sewbacca avatar sumneko avatar uhziel avatar wetzlmaier avatar xiaobin0860 avatar xiyaowong avatar young40 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

lua-language-server's Issues

[Question] How do you add an application's API to Intellisense?

I am using Lua for the purpose of writing scripts for the application Blackmagic Fusion. My wish would be to have API auto-completion/intellisense based on that application API. I'm willing to put in the work to put the API into some format that VS Code can interpret, as I have done for other projects (Typescript). But I am unsure how to go about this. Thank you for any help!

Here's an example of the type of script I'm talking about:

https://github.com/movalex/fusion_scripts/blob/master/Scripts/Tool/Macro2Group.lua

Build/Use outside of VSCode

I've been looking for a good lua language server since I've found EmmyLua to be a little unreliable. I want to use this with vim, which just requires running the server, but I don't see instructions for how to build the server standalone.

Is it possible to run as a stdio server so I could use it with vim?

ๅœจๅ…ถไป–็›ฎๅฝ•ไธ‹ๆ— ๆณ•่ฟ่กŒ๏ผŒๅฟ…้กปๅœจserver็›ฎๅฝ•ไธ‹ๆ‰ๅฏไปฅ

/Users/jiya/workspace/lua-language-server/publish/lua-language-server/server/bin/lua-language-server /Users/jiya/workspace/lua-language-server/publish/lua-language-server/server/main.lua
โžœ  workspace /Users/jiya/workspace/lua-language-server/publish/lua-language-server/server/bin/lua-language-server /Users/jiya/workspace/lua-language-server/publish/lua-language-server/server/main.lua
/Users/jiya/workspace/lua-language-server/publish/lua-language-server/server/bin/lua-language-server: ...guage-server/publish/lua-language-server/server/main.lua:1: module 'bee.filesystem' not found:
	no field package.preload['bee.filesystem']
	no file '/Users/jiya/workspace/lua-language-server/server/src/bee/filesystem.lua'
	no file '/Users/jiya/workspace/lua-lsp/bee/filesystem/bee/filesystem.lua'
	no file '/Users/jiya/.luarocks/share/lua/5.1/bee/filesystem.lua:./bee/filesystem.lua'
	no file '/usr/local/Cellar/lua/5.3.5_1/LuaDist/lib/lua/bee/filesystem.lua'
	no file '/usr/local/Cellar/lua/5.3.5_1/LuaDist/lib/lua/bee/filesystem/bee/filesystem.lua'
	no file '/usr/local/Cellar/lua/5.3.5_1/LuaDist/share/lua/bee/filesystem.lua'
	no file '/usr/local/Cellar/lua/5.3.5_1/LuaDist/share/lua/bee/filesystem/bee/filesystem.lua'
	no file '/usr/local/share/lua/5.3/bee/filesystem.lua'
	no file '/usr/local/share/lua/5.3/bee/filesystem/init.lua'
	no file '/usr/local/lib/lua/5.3/bee/filesystem.lua'
	no file '/usr/local/lib/lua/5.3/bee/filesystem/init.lua'
	no file ''/Users/jiya/workspace/lua-language-server/server/src/bee/filesystem.lua'
	no file '/Users/jiya/workspace/lua-lsp/bee/filesystem/bee/filesystem.lua'
	no file '/Users/jiya/.luarocks/share/lua/5.1/bee/filesystem.lua:./bee/filesystem.lua'
	no file '/usr/local/Cellar/lua/5.3.5_1/LuaDist/lib/lua/bee/filesystem.lua'
	no file '/usr/local/Cellar/lua/5.3.5_1/LuaDist/lib/lua/bee/filesystem/bee/filesystem.lua'
	no file '/usr/local/Cellar/lua/5.3.5_1/LuaDist/share/lua/bee/filesystem.lua'
	no file '/usr/local/Cellar/lua/5.3.5_1/LuaDist/share/lua/bee/filesystem/bee/filesystem.lua'
	no file '/usr/local/share/lua/5.3/bee/filesystem.lua'
	no file '/usr/local/share/lua/5.3/bee/filesystem/init.lua'
	no file '/usr/local/lib/lua/5.3/bee/filesystem.lua'
	no file '/usr/local/lib/lua/5.3/bee/filesystem/init.lua'
	no file '/usr/local/share/lua/5.4/bee/filesystem.lua'
	no file '/usr/local/share/lua/5.4/bee/filesystem/init.lua'
	no file '/usr/local/lib/lua/5.4/bee/filesystem.lua'
	no file '/usr/local/lib/lua/5.4/bee/filesystem/init.lua'
	no file './bee/filesystem.lua'
	no file './bee/filesystem/init.lua'
	no file ''
	no file '/usr/local/share/lua/5.4/bee/filesystem.lua'
	no file '/usr/local/share/lua/5.4/bee/filesystem/init.lua'
	no file '/usr/local/lib/lua/5.4/bee/filesystem.lua'
	no file '/usr/local/lib/lua/5.4/bee/filesystem/init.lua'
	no file './bee/filesystem.lua'
	no file './bee/filesystem/init.lua'
	no file ''
	no file '/usr/local/share/lua/5.4/bee/filesystem.lua'
	no file '/usr/local/share/lua/5.4/bee/filesystem/init.lua'
	no file '/usr/local/lib/lua/5.4/bee/filesystem.lua'
	no file '/usr/local/lib/lua/5.4/bee/filesystem/init.lua'
	no file './bee/filesystem.lua'
	no file './bee/filesystem/init.lua'
	no file ''
	no file '''
	no file '/usr/local/share/lua/5.4/bee/filesystem.lua'
	no file '/usr/local/share/lua/5.4/bee/filesystem/init.lua'
	no file '/usr/local/lib/lua/5.4/bee/filesystem.lua'
	no file '/usr/local/lib/lua/5.4/bee/filesystem/init.lua'
	no file './bee/filesystem.lua'
	no file './bee/filesystem/init.lua'
	no file ''
	no file '/usr/local/share/lua/5.4/bee/filesystem.lua'
	no file '/usr/local/share/lua/5.4/bee/filesystem/init.lua'
	no file '/usr/local/lib/lua/5.4/bee/filesystem.lua'
	no file '/usr/local/lib/lua/5.4/bee/filesystem/init.lua'
	no file './bee/filesystem.lua'
	no file './bee/filesystem/init.lua'
	no file ''
	no file '/usr/local/share/lua/5.4/bee/filesystem.lua'
	no file '/usr/local/share/lua/5.4/bee/filesystem/init.lua'
	no file '/usr/local/lib/lua/5.4/bee/filesystem.lua'
	no file '/usr/local/lib/lua/5.4/bee/filesystem/init.lua'
	no file './bee/filesystem.lua'
	no file './bee/filesystem/init.lua'
	no file ''
	no file './bee/filesystem.so'
	no file '/usr/local/Cellar/lua/5.3.5_1/LuaDist/lib/lua/bee/filesystem.so'
	no file '/usr/local/Cellar/lua/5.3.5_1/LuaDist/lib/lua/bee/filesystem/bee/filesystem.so'
	no file '/usr/local/Cellar/lua/5.3.5_1/LuaDist/share/lua/bee/filesystem.so'
	no file '/usr/local/Cellar/lua/5.3.5_1/LuaDist/share/lua/bee/filesystem/bee/filesystem.so'
	no file '/usr/local/share/lua/5.3/bee/filesystem.so'
	no file '/usr/local/share/lua/5.3/bee/filesystem/init.so'
	no file '/usr/local/lib/lua/5.3/bee/filesystem.so'
	no file '/usr/local/lib/lua/5.3/bee/filesystem/init.so'
	no file '/usr/local/lib/lua/5.4/bee/filesystem.so'
	no file '/usr/local/lib/lua/5.4/loadall.so'
	no file './bee/filesystem.so'
	no file ''
	no file ''
	no file './bee.so'
	no file '/usr/local/Cellar/lua/5.3.5_1/LuaDist/lib/lua/bee.so'
	no file '/usr/local/Cellar/lua/5.3.5_1/LuaDist/lib/lua/bee/bee.so'
	no file '/usr/local/Cellar/lua/5.3.5_1/LuaDist/share/lua/bee.so'
	no file '/usr/local/Cellar/lua/5.3.5_1/LuaDist/share/lua/bee/bee.so'
	no file '/usr/local/share/lua/5.3/bee.so'
	no file '/usr/local/share/lua/5.3/bee/init.so'
	no file '/usr/local/lib/lua/5.3/bee.so'
	no file '/usr/local/lib/lua/5.3/bee/init.so'
	no file '/usr/local/lib/lua/5.4/bee.so'
	no file '/usr/local/lib/lua/5.4/loadall.so'
	no file './bee.so'
	no file ''
	no file ''
stack traceback:
	[C]: in function 'require'
	...guage-server/publish/lua-language-server/server/main.lua:1: in main chunk
	[C]: in ?

Suggestion: Support raw "table" files

Blackmagic Fusion uses lua for its data storage. It has some files that are formatted like this: a table without a name. I know this is non-standard, but thought I'd point it out. Your extension marks this file as invalid lua.

{
	Tools = ordered() {
		ExampleMacro = MacroOperator {
			Outputs = {
				MainOutput1 = InstanceOutput {
					SourceOp = "ExampleMacro",
					Source = "Output",
				}
			},
			ViewInfo = GroupInfo {
				Name = "ExampleMacro",
				Pos = { 0, 0 }
			},
			Tools = ordered() {
				ExampleTool = TimeStretcher {
					CtrlWZoom = false,
					NameSet = true,
					Inputs = {
						SourceTime = Input {
							Value = 0,
						},
						InterpolateBetweenFrames = Input { Value = 0, },
						SampleSpread = Input { Disabled = true, },
					},
					ViewInfo = OperatorInfo { Pos = { -935, -1204.5 } },
				}
			},
		}
	},
	ActiveTool = "ExampleMacro"
}

Support for array, table types

With other implementations of EmmyLua i've seen, it is possible to use types such as "string[]" or "table<string, string>". As of right now, it seems that arrays/tables aren't supported.

image

^ Without using the for loop, the language server assumes the type of "names" to be any. Ideally, I would like it to recognize that each (key, value) ipair/pair of names is (number, string).

No symbols found

On some files i get the "no symbols found".
Then I get the following error (don't know if they are connected, but this happens in every file for which no symbols found). In the example bellow, the line mentioned is just a comment:
--Then register this handler for the event you want it to handle (or multiple events) and on handle_event it will be called.

[Error - 11:44:35 AM] Request textDocument/completion failed.
Message: {
context = {
triggerCharacter = " ",
triggerKind = 2,
},
position = {
character = 5,
line = 5,
},
textDocument = {
uri = "file:///c%3A/test/event_srv.lua",
},
}
...code/extensions/sumneko.lua-0.8.8/server/src/service.lua:483: ...ode/extensions/sumneko.lua-0.8.8/server/src/vm\value.lua:116: table index is nil
stack traceback:
...ode/extensions/sumneko.lua-0.8.8/server/src/vm\value.lua:138: in method 'setChild'
...vscode/extensions/sumneko.lua-0.8.8/server/src/vm\vm.lua:795: in function 'vm.manager.setOne'
...vscode/extensions/sumneko.lua-0.8.8/server/src/vm\vm.lua:825: in local 'callback'
...vscode/extensions/sumneko.lua-0.8.8/server/src/vm\vm.lua:146: in function 'vm.manager.forList'
...vscode/extensions/sumneko.lua-0.8.8/server/src/vm\vm.lua:823: in function 'vm.manager.doSet'
...vscode/extensions/sumneko.lua-0.8.8/server/src/vm\vm.lua:1021: in function 'vm.manager.doAction'
...vscode/extensions/sumneko.lua-0.8.8/server/src/vm\vm.lua:1067: in function 'vm.manager.doActions'
...vscode/extensions/sumneko.lua-0.8.8/server/src/vm\vm.lua:110: in function 'vm.manager.runFunction'
...vscode/extensions/sumneko.lua-0.8.8/server/src/vm\vm.lua:1085: in function 'vm.manager.callLeftFuncions'
...vscode/extensions/sumneko.lua-0.8.8/server/src/vm\vm.lua:1269: in function <...vscode/extensions/sumneko.lua-0.8.8/server/src/vm\vm.lua:1256>
...
...code/extensions/sumneko.lua-0.8.8/server/src/service.lua:329: in method 'loadVM'
....lua-0.8.8/server/src/method\textDocument\completion.lua:68: in upvalue 'fastCompletion'
....lua-0.8.8/server/src/method\textDocument\completion.lua:121: in function 'method.textDocument/completion'
[C]: in function 'xpcall'
...code/extensions/sumneko.lua-0.8.8/server/src/service.lua:50: in method '_callMethod'
...code/extensions/sumneko.lua-0.8.8/server/src/service.lua:100: in method '_doProto'
...code/extensions/sumneko.lua-0.8.8/server/src/service.lua:656: in method '_loadProto'
...code/extensions/sumneko.lua-0.8.8/server/src/service.lua:814: in method 'onTick'
...code/extensions/sumneko.lua-0.8.8/server/src/service.lua:837: in method 'listen'
...Sev.vscode\extensions\sumneko.lua-0.8.8\server\main.lua:32: in main chunk
[C]: in ?
stack traceback:
[C]: in function 'error'
...code/extensions/sumneko.lua-0.8.8/server/src/service.lua:483: in method 'compileVM'
...code/extensions/sumneko.lua-0.8.8/server/src/service.lua:329: in method 'loadVM'
....lua-0.8.8/server/src/method\textDocument\completion.lua:68: in upvalue 'fastCompletion'
....lua-0.8.8/server/src/method\textDocument\completion.lua:121: in function 'method.textDocument/completion'
[C]: in function 'xpcall'
...code/extensions/sumneko.lua-0.8.8/server/src/service.lua:50: in method '_callMethod'
...code/extensions/sumneko.lua-0.8.8/server/src/service.lua:100: in method '_doProto'
...code/extensions/sumneko.lua-0.8.8/server/src/service.lua:656: in method '_loadProto'
...code/extensions/sumneko.lua-0.8.8/server/src/service.lua:814: in method 'onTick'
...code/extensions/sumneko.lua-0.8.8/server/src/service.lua:837: in method 'listen'
...Sev.vscode\extensions\sumneko.lua-0.8.8\server\main.lua:32: in main chunk
[C]: in ?
Code: -32603

require completion doesn't work

STR:

  1. sudo luarocks install luajson
  2. paste the following:
local json = require("json")
print(json.decode("[1,2]"))
  1. json object completion doesn't work

Opening workspace file on network drive breaks extension after recent update

After a recent update to the extension today, the plugin does not function at all when opening workspace files that are on a network drive.
The document outline, warnings, autocompletions, etc are non operational. It was working fine yesterday.
I updated the plugin on my other machine as well, and the extension broke on that as well.

I've also tried re-installing, that didn't fix the issue.

image
Infinite hang for document outline
image
No warnings or autocompletions at all
image
No problems being displayed

If you open a workspace file that's on the local drive, the extension works as expected.

Go To ็›ธๅ…ณ็š„ๅŠŸ่ƒฝไผผไนŽๆฒกๆœ‰ๆ•ˆๆžœ

ไปฅ MoeHero ้กน็›ฎไธบไพ‹๏ผˆๅฎŒๆ•ด๏ผŒๅธฆๅญๆจกๅ—๏ผ‰
ๅ…ทไฝ“ๆ“ไฝœไธบ๏ผš

  1. ๅฏนไบŽ require 'war3.id'๏ผŒctrl + left click war3.id ๆฒกๆœ‰่ทณ่ฝฌๅˆฐๆ–‡ไปถๅ†…
  2. ๅฏนไบŽ local rect = require 'types.rect'๏ผŒctrl + left click rect.init() ๆฒกๆœ‰่ทณ่ฝฌๅˆฐๅฎšไน‰ๅค„
  3. ctrl + shift + p, ๆŸฅ็œ‹ๆ–‡ไปถๆˆ–่€…ๅทฅไฝœๅŒบๅ†…็š„ symbols๏ผŒไธๅญ˜ๅœจๅ†…ๅฎน
  4. vscode ๅœจ background ไธ€ๅฎšๆ—ถ้—ดๅŽ๏ผŒCode.exe ๅŒๅ็š„ process ไธญๆœ‰ไธ€ไธชไผš็ช็„ถๅ ็”จ 35% ็š„ CPU (i7-6700) ๅ’Œ 490M ๅทฆๅณ็š„ๅ†…ๅญ˜๏ผŒ็บฆไธ€ๅˆ†้’ŸๅŽๆญฃๅธธ๏ผŒไธ็กฎๅฎšๆ˜ฏ่ขซ vscode ่‡ชๅŠจๆ€ๆŽ‰ไบ†่ฟ˜ๆ˜ฏ็ป“ๆŸไบ†ๅทฅไฝœใ€‚
    ps: ๆˆ‘ๅฐ่ฏ•ๆŠŠๅทฅไฝœ็›ฎๅฝ•่ฎพ็ฝฎไธบ / ๅ’Œ /scripts ้ƒฝไธ€ๆ ทใ€‚

ไธ็Ÿฅ้“ๆ˜ฏไธๆ˜ฏๆˆ‘ไฝฟ็”จๅงฟโ™‚ๅŠฟไธๅฏนใ€‚
ๆˆ‘ๅฏไปฅๆไพ›้œ€่ฆ็š„้ขๅค–ไฟกๆฏใ€‚

Settings not working

Untitled

Something has changed in the last few days? I can't find a way to get settings to work. Tried putting settings in both User and Workspace files. Nothing seems to work. Sorry I can't explain it better then the picture!

Disable diagnostics didn't work?

capture
Hi,

How can I disable diagnostics for variables/function etc. Because Lua.diagnostics.disable doesn't work.I mean it takes as argument an array, but an of what?

I checked the vscode plugin page, at the Contributions tab and Lua.diagnostics.disable isn't documented. Also I tried with "Lua.diagnostics.disable": ['undefined-global'] and is still doesn't works.

High CPU usage

Runnig powertop, arch linux

Actual workspace contains no lua files at all, that's bad for laptop
image

[Suggestion] No colors for emmy comments (and 3 other things)

No Colors from your extention
No Colors
Some Colors from another extention
Some Colors
And from Intelij
Intelij

In the other extention they dont use text-mate Grammar for it but the LSP due to types with @Class for example just as a note


Another suggestion is coloring variable definition and useage's depending if there global, local or non-local.
Intelij


No file class?
image
This type is in intelij as well


EDIT: This is now fixed.
And finally a bug?
not supporting brackets with types
Vscode
Intelij


Do you wan't me to open a different 'issue' for them or just leave them here?
If im asking too much or anoying you with my issue requests then sorry, its just points i found and i dont do much on github in the way on contribution until this.
If i was able to understand your code i would attempt to add these my self with a pull request but am failing to understand it... (this is just me)
Anway, keep up the good work, its a really nice extention and helpful.

Doesn't handle require being redefined well at all.

In cases where require is getting redefined in the eyes of the lua language server, it completely breaks the type inference across files.

It'd be nice if there was an emmy-like syntax we can decorate our functions with that identified the function as a "require-alike" or a "dofile-alike."

@return often doesn't work

Hey,

Annotating a function with @return often doesn't do anything, or at least it doesn't override what the extension thinks a function's return value might be.

Example:
emmylua
Here I annotated the function with @return any, but in the tooltip constantly flips between function, integer, string and so on.

MacOS ๆ‰‹ๅŠจ build ็š„ bin/lua-language-server ้š”ไธ€ๆฎตๆ—ถ้—ดไผšๆถˆๅคฑ

็„ถๅŽ็›ฎๅฝ•้‡Œๅคšๅ‡บๆฅไธ€ๅ † Windows ๅนณๅฐ็”จ็š„ .dll ๅ’Œ .exe ๆ–‡ไปถ๏ผŒไธ็Ÿฅ้“ๆ˜ฏไธๆ˜ฏ sumneko.lua VSCode ๆ’ไปถๆ›ดๆ–ฐ้€ ๆˆ็š„๏ผŸ่ฐข่ฐขใ€‚

mellon@collie:lua-language-server $ ls -l /Users/mellon/.vscode/extensions/sumneko.lua-0.9.9/server/bin/
total 6664
-rw-r--r--  1 mellon  staff    18744 May 29 21:46 api-ms-win-core-console-l1-1-0.dll
-rw-r--r--  1 mellon  staff    18232 May 29 21:46 api-ms-win-core-datetime-l1-1-0.dll
-rw-r--r--  1 mellon  staff    18232 May 29 21:46 api-ms-win-core-debug-l1-1-0.dll
-rw-r--r--  1 mellon  staff    18232 May 29 21:46 api-ms-win-core-errorhandling-l1-1-0.dll
-rw-r--r--  1 mellon  staff    21816 May 29 21:46 api-ms-win-core-file-l1-1-0.dll
-rw-r--r--  1 mellon  staff    18232 May 29 21:46 api-ms-win-core-file-l1-2-0.dll
-rw-r--r--  1 mellon  staff    18232 May 29 21:46 api-ms-win-core-file-l2-1-0.dll
-rw-r--r--  1 mellon  staff    18232 May 29 21:46 api-ms-win-core-handle-l1-1-0.dll
-rw-r--r--  1 mellon  staff    18232 May 29 21:46 api-ms-win-core-heap-l1-1-0.dll
-rw-r--r--  1 mellon  staff    17856 May 29 21:46 api-ms-win-core-interlocked-l1-1-0.dll
-rw-r--r--  1 mellon  staff    18744 May 29 21:46 api-ms-win-core-libraryloader-l1-1-0.dll
-rw-r--r--  1 mellon  staff    20792 May 29 21:46 api-ms-win-core-localization-l1-2-0.dll
-rw-r--r--  1 mellon  staff    18744 May 29 21:46 api-ms-win-core-memory-l1-1-0.dll
-rw-r--r--  1 mellon  staff    18232 May 29 21:46 api-ms-win-core-namedpipe-l1-1-0.dll
-rw-r--r--  1 mellon  staff    19248 May 29 21:46 api-ms-win-core-processenvironment-l1-1-0.dll
-rw-r--r--  1 mellon  staff    19392 May 29 21:46 api-ms-win-core-processthreads-l1-1-0.dll
-rw-r--r--  1 mellon  staff    18744 May 29 21:46 api-ms-win-core-processthreads-l1-1-1.dll
-rw-r--r--  1 mellon  staff    17712 May 29 21:46 api-ms-win-core-profile-l1-1-0.dll
-rw-r--r--  1 mellon  staff    17720 May 29 21:46 api-ms-win-core-rtlsupport-l1-1-0.dll
-rw-r--r--  1 mellon  staff    18232 May 29 21:46 api-ms-win-core-string-l1-1-0.dll
-rw-r--r--  1 mellon  staff    20280 May 29 21:46 api-ms-win-core-synch-l1-1-0.dll
-rw-r--r--  1 mellon  staff    18744 May 29 21:46 api-ms-win-core-synch-l1-2-0.dll
-rw-r--r--  1 mellon  staff    19248 May 29 21:46 api-ms-win-core-sysinfo-l1-1-0.dll
-rw-r--r--  1 mellon  staff    18224 May 29 21:46 api-ms-win-core-timezone-l1-1-0.dll
-rw-r--r--  1 mellon  staff    18232 May 29 21:46 api-ms-win-core-util-l1-1-0.dll
-rw-r--r--  1 mellon  staff    19256 May 29 21:46 api-ms-win-crt-conio-l1-1-0.dll
-rw-r--r--  1 mellon  staff    22328 May 29 21:46 api-ms-win-crt-convert-l1-1-0.dll
-rw-r--r--  1 mellon  staff    18736 May 29 21:46 api-ms-win-crt-environment-l1-1-0.dll
-rw-r--r--  1 mellon  staff    20280 May 29 21:46 api-ms-win-crt-filesystem-l1-1-0.dll
-rw-r--r--  1 mellon  staff    19256 May 29 21:46 api-ms-win-crt-heap-l1-1-0.dll
-rw-r--r--  1 mellon  staff    18744 May 29 21:46 api-ms-win-crt-locale-l1-1-0.dll
-rw-r--r--  1 mellon  staff    28984 May 29 21:46 api-ms-win-crt-math-l1-1-0.dll
-rw-r--r--  1 mellon  staff    26424 May 29 21:46 api-ms-win-crt-multibyte-l1-1-0.dll
-rw-r--r--  1 mellon  staff    73016 May 29 21:46 api-ms-win-crt-private-l1-1-0.dll
-rw-r--r--  1 mellon  staff    19256 May 29 21:46 api-ms-win-crt-process-l1-1-0.dll
-rw-r--r--  1 mellon  staff    22840 May 29 21:46 api-ms-win-crt-runtime-l1-1-0.dll
-rw-r--r--  1 mellon  staff    24368 May 29 21:46 api-ms-win-crt-stdio-l1-1-0.dll
-rw-r--r--  1 mellon  staff    23488 May 29 21:46 api-ms-win-crt-string-l1-1-0.dll
-rw-r--r--  1 mellon  staff    20792 May 29 21:46 api-ms-win-crt-time-l1-1-0.dll
-rw-r--r--  1 mellon  staff    18744 May 29 21:46 api-ms-win-crt-utility-l1-1-0.dll
-rw-r--r--  1 mellon  staff   272896 May 29 21:46 bee.dll
-rw-r--r--  1 mellon  staff    26624 May 29 21:46 lni.dll
-rw-r--r--  1 mellon  staff    47104 May 29 21:46 lpeglabel.dll
-rw-r--r--  1 mellon  staff   166912 May 29 21:46 lua-language-server.exe
-rw-r--r--  1 mellon  staff   293888 May 29 21:46 lua54.dll
-rw-r--r--  1 mellon  staff   447024 May 29 21:46 msvcp140.dll
-rw-r--r--  1 mellon  staff  1142072 May 29 21:46 ucrtbase.dll
-rw-r--r--  1 mellon  staff    79920 May 29 21:46 vcruntime140.dll

sumneko.lua-lsp server crash - matcher.lua

I cannot get the extension to work at the moment because I get this error repeatedly until eventually the extension decides to not restart the server.

c:\Users\Feez.vscode\extensions\sumneko.lua-0.9.4\server\bin\lua-language-server: ...extensions/sumneko.lua-0.9.4/server/src/glob\matcher.lua:99: attempt to concatenate a nil value (field 'integer index')
stack traceback:
...extensions/sumneko.lua-0.9.4/server/src/glob\matcher.lua:99: in function <...extensions/sumneko.lua-0.9.4/server/src/glob\matcher.lua:95>
(...tail calls...)
...extensions/sumneko.lua-0.9.4/server/src/glob\matcher.lua:52: in function <...extensions/sumneko.lua-0.9.4/server/src/glob\matcher.lua:50>
(...tail calls...)
...extensions/sumneko.lua-0.9.4/server/src/glob\matcher.lua:41: in function <...extensions/sumneko.lua-0.9.4/server/src/glob\matcher.lua:40>
(...tail calls...)
...extensions/sumneko.lua-0.9.4/server/src/glob\matcher.lua:61: in method 'anyPath'
...extensions/sumneko.lua-0.9.4/server/src/glob\matcher.lua:123: in method 'pattern'
...extensions/sumneko.lua-0.9.4/server/src/glob\matcher.lua:144: in function 'glob.matcher'
...tensions/sumneko.lua-0.9.4/server/src/glob\gitignore.lua:66: in method 'addPattern'
...tensions/sumneko.lua-0.9.4/server/src/glob\gitignore.lua:204: in function 'glob.gitignore'
...de/extensions/sumneko.lua-0.9.4/server/src/workspace.lua:118: in method 'scanFiles'
...de/extensions/sumneko.lua-0.9.4/server/src/workspace.lua:158: in method 'init'
...ions/sumneko.lua-0.9.4/server/src/method\initialized.lua:7: in upvalue 'initAfterConfig'
...ions/sumneko.lua-0.9.4/server/src/method\initialized.lua:65: in field 'callback'
.../.vscode/extensions/sumneko.lua-0.9.4/server/src/rpc.lua:79: in function 'rpc.recieve'
...code/extensions/sumneko.lua-0.9.4/server/src/service.lua:698: in method '_loadProto'
...code/extensions/sumneko.lua-0.9.4/server/src/service.lua:681: in method '_doCompileTask'
...code/extensions/sumneko.lua-0.9.4/server/src/service.lua:923: in method 'onTick'
...code/extensions/sumneko.lua-0.9.4/server/src/service.lua:945: in method 'listen'
...eez.vscode\extensions\sumneko.lua-0.9.4\server\main.lua:32: in main chunk
[C]: in ?
[Info - 12:22:20 PM] Connection to server got closed. Server will restart

Marking variable as global doesn't register

For some odd reason, when I mark a variable as 'global' in the extension settings, the extension seems to ignore the settings.

Here's an example of what I'm talking about.
image

As you can see here, I have custom globals defined in settings.json.

However the warnings for undefined globals are still showing, even after re-opening VSCode.
image

Ignore Files/Folders

I'm not sure if I'm just using VSCode in a way that others don't, but for me, I have many folders in my Workspace that do not need to be checked for syntax (they are part of an API, and I have no reason to 'correct' any of their syntax) - but they do help contribute to code completion. Would it be reasonable to have an 'Ignore File/Folder' setting with regards to syntax checking? It's not really a big issue, and I can live without it, but thought I'd mention it.

Lua.runtime.library and expected use

I have Lua scripts that are loaded into a 3rd party service. Many globals are defined there. I have the source for the API and I'm trying to use Lua.runtime.library in the config to point to the library.

This setting doesn't seem to have any effect. How should it be used?

Register function environment variables

This extension is able to detect usage of undefined global variables:
image

However, setfenv is used on this function to define the missing variable, but at another point in the code that the parser can't detect. Is it possible to somehow tell the parser to ignore this diagnostic? Something like:

local block = function(_)
    -- env: {block, assert, error}
    block()
end

Then it would accept those values? I know you can define globals for the project, but this doesn't affect the entire project, only those functions, so it would be cool if you could define it somehow.

Alternatively, could we just disable the diagnostic?

local block = function(_)
    -- disable: undefined-global
    block()
end

I don't know if the parser supports reading comments like that, let me know if that won't work or if you have better ideas for it.

Configure severity of code issues

Unless I'm missing a setting for it, the severity of code issues is currently fixed:
image

It would be great if you could configure what you consider a suggestion, warning or error.

Cannot "precompile" on macOS 10.14.5

> Executing task: ninja -f ninja/macos.ninja <

[0/3] cd 3rd/bee.lua && ninja -f ninja/macos.ninja
[43/89] Compile CXX build/macos/obj/bee/lua_filesystem.obj
FAILED: build/macos/obj/bee/lua_filesystem.obj 
g++ -MMD -MT build/macos/obj/bee/lua_filesystem.obj -MF build/macos/obj/bee/lua_filesystem.obj.d -std=c++17 -O2 -Wall -I3rd/lua/src -I3rd/lua-seri -I3rd/incbin -I. -Dspan_FEATURE_BYTE_SPAN=1 -DNDEBUG -fPIC -o build/macos/obj/bee/lua_filesystem.obj -c binding/lua_filesystem.cpp
In file included from binding/lua_filesystem.cpp:7:
./bee/utility/path_helper.h:8:71: error: 'path' is unavailable: introduced in macOS 10.15
    _BEE_API auto dll_path(void* module_handle)->nonstd::expected<fs::path, std::exception>;
                                                                      ^
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/filesystem:739:24: note: 'path' has been explicitly marked unavailable here
class _LIBCPP_TYPE_VIS path {
                       ^
In file included from binding/lua_filesystem.cpp:7:
./bee/utility/path_helper.h:9:52: error: 'path' is unavailable: introduced in macOS 10.15
    _BEE_API auto exe_path()->nonstd::expected<fs::path, std::exception>;
                                                   ^
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/filesystem:739:24: note: 'path' has been explicitly marked unavailable here
class _LIBCPP_TYPE_VIS path {
                       ^
In file included from binding/lua_filesystem.cpp:7:
./bee/utility/path_helper.h:10:52: error: 'path' is unavailable: introduced in macOS 10.15
    _BEE_API auto dll_path()->nonstd::expected<fs::path, std::exception>;
                                                   ^
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/filesystem:739:24: note: 'path' has been explicitly marked unavailable here
class _LIBCPP_TYPE_VIS path {
                       ^
In file included from binding/lua_filesystem.cpp:7:
./bee/utility/path_helper.h:11:29: error: 'path' is unavailable: introduced in macOS 10.15
    _BEE_API bool equal(fs::path const& lhs, fs::path const& rhs);
                            ^
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/filesystem:739:24: note: 'path' has been explicitly marked unavailable here
class _LIBCPP_TYPE_VIS path {
                       ^
In file included from binding/lua_filesystem.cpp:7:
./bee/utility/path_helper.h:11:50: error: 'path' is unavailable: introduced in macOS 10.15
    _BEE_API bool equal(fs::path const& lhs, fs::path const& rhs);
                                                 ^
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/filesystem:739:24: note: 'path' has been explicitly marked unavailable here
class _LIBCPP_TYPE_VIS path {
                       ^
binding/lua_filesystem.cpp:18:37: error: 'path' is unavailable: introduced in macOS 10.15
            directory_container(fs::path const& o)
                                    ^
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/filesystem:739:24: note: 'path' has been explicitly marked unavailable here
class _LIBCPP_TYPE_VIS path {
                       ^
binding/lua_filesystem.cpp:20:17: error: 'directory_iterator' is unavailable: introduced in macOS 10.15
            fs::directory_iterator begin() const { return fs::directory_iterator(p); }
                ^
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/filesystem:2408:7: note: 'directory_iterator' has been explicitly marked unavailable here
class directory_iterator {
      ^
binding/lua_filesystem.cpp:21:17: error: 'directory_iterator' is unavailable: introduced in macOS 10.15
            fs::directory_iterator end() const { return fs::directory_iterator(); }
                ^
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/filesystem:2408:7: note: 'directory_iterator' has been explicitly marked unavailable here
class directory_iterator {
      ^
binding/lua_filesystem.cpp:24:23: error: 'path' is unavailable: introduced in macOS 10.15
            const fs::path& p;
                      ^
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/filesystem:739:24: note: 'path' has been explicitly marked unavailable here
class _LIBCPP_TYPE_VIS path {
                       ^
binding/lua_filesystem.cpp:20:63: error: 'directory_iterator' is unavailable: introduced in macOS 10.15
            fs::directory_iterator begin() const { return fs::directory_iterator(p); }
                                                              ^
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/filesystem:2408:7: note: 'directory_iterator' has been explicitly marked unavailable here
class directory_iterator {
      ^
binding/lua_filesystem.cpp:20:59: error: 'directory_iterator' is unavailable: introduced in macOS 10.15
            fs::directory_iterator begin() const { return fs::directory_iterator(p); }
                                                          ^
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/filesystem:2420:12: note: 'directory_iterator' has been explicitly marked unavailable here
  explicit directory_iterator(const path& __p)
           ^
binding/lua_filesystem.cpp:20:59: error: '~directory_iterator' is unavailable: introduced in macOS 10.15
            fs::directory_iterator begin() const { return fs::directory_iterator(p); }
                                                          ^
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/filesystem:2445:3: note: '~directory_iterator' has been explicitly marked unavailable here
  ~directory_iterator() = default;
  ^
binding/lua_filesystem.cpp:21:61: error: 'directory_iterator' is unavailable: introduced in macOS 10.15
            fs::directory_iterator end() const { return fs::directory_iterator(); }
                                                            ^
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/filesystem:2408:7: note: 'directory_iterator' has been explicitly marked unavailable here
class directory_iterator {
      ^
binding/lua_filesystem.cpp:21:57: error: 'directory_iterator' is unavailable: introduced in macOS 10.15
            fs::directory_iterator end() const { return fs::directory_iterator(); }
                                                        ^
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/filesystem:2418:3: note: 'directory_iterator' has been explicitly marked unavailable here
  directory_iterator() noexcept {}
  ^
binding/lua_filesystem.cpp:21:57: error: 'directory_iterator' is unavailable: introduced in macOS 10.15
            fs::directory_iterator end() const { return fs::directory_iterator(); }
                                                        ^
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/filesystem:2418:3: note: 'directory_iterator' has been explicitly marked unavailable here
  directory_iterator() noexcept {}
  ^
binding/lua_filesystem.cpp:21:57: error: '~directory_iterator' is unavailable: introduced in macOS 10.15
            fs::directory_iterator end() const { return fs::directory_iterator(); }
                                                        ^
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/filesystem:2445:3: note: '~directory_iterator' has been explicitly marked unavailable here
  ~directory_iterator() = default;
  ^
binding/lua_filesystem.cpp:29:20: error: 'path' is unavailable: introduced in macOS 10.15
        static fs::path& to(lua_State* L, int idx) {
                   ^
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/filesystem:739:24: note: 'path' has been explicitly marked unavailable here
class _LIBCPP_TYPE_VIS path {
                       ^
binding/lua_filesystem.cpp:30:26: error: 'path' is unavailable: introduced in macOS 10.15
            return *(fs::path*)getObject(L, idx, "filesystem");
                         ^
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/filesystem:739:24: note: 'path' has been explicitly marked unavailable here
class _LIBCPP_TYPE_VIS path {
                       ^
binding/lua_filesystem.cpp:35:31: error: 'path' is unavailable: introduced in macOS 10.15
            new (storage) fs::path();
                              ^
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/filesystem:739:24: note: 'path' has been explicitly marked unavailable here
class _LIBCPP_TYPE_VIS path {
                       ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
[46/89] Compile CXX build/macos/obj/bee/lua_subprocess.obj
FAILED: build/macos/obj/bee/lua_subprocess.obj 
g++ -MMD -MT build/macos/obj/bee/lua_subprocess.obj -MF build/macos/obj/bee/lua_subprocess.obj.d -std=c++17 -O2 -Wall -I3rd/lua/src -I3rd/lua-seri -I3rd/incbin -I. -Dspan_FEATURE_BYTE_SPAN=1 -DNDEBUG -fPIC -o build/macos/obj/bee/lua_subprocess.obj -c binding/lua_subprocess.cpp
In file included from binding/lua_subprocess.cpp:4:
./bee/lua/path.h:29:42: error: 'path' is unavailable: introduced in macOS 10.15
            const fs::path& path = *(fs::path*)getObject(L, idx, "filesystem");
                                         ^
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/filesystem:739:24: note: 'path' has been explicitly marked unavailable here
class _LIBCPP_TYPE_VIS path {
                       ^
In file included from binding/lua_subprocess.cpp:4:
./bee/lua/path.h:29:23: error: 'path' is unavailable: introduced in macOS 10.15
            const fs::path& path = *(fs::path*)getObject(L, idx, "filesystem");
                      ^
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/filesystem:739:24: note: 'path' has been explicitly marked unavailable here
class _LIBCPP_TYPE_VIS path {
                       ^
In file included from binding/lua_subprocess.cpp:4:
./bee/lua/path.h:30:25: error: 'string' is unavailable: introduced in macOS 10.15
            return path.string<lua::string_type::value_type>();
                        ^
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/filesystem:990:3: note: 'string' has been explicitly marked unavailable here
  string(const _Allocator& __a = _Allocator()) const {
  ^
In file included from binding/lua_subprocess.cpp:4:
./bee/lua/path.h:30:25: error: 'string<char, std::__1::char_traits<char>, std::__1::allocator<char> >' is unavailable: introduced in macOS 10.15
            return path.string<lua::string_type::value_type>();
                        ^
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/filesystem:990:3: note: 'string<char, std::__1::char_traits<char>, std::__1::allocator<char> >' has been explicitly marked unavailable here
  string(const _Allocator& __a = _Allocator()) const {
  ^
4 errors generated.
[47/89] Compile CXX build/macos/obj/bee/path_helper.obj
FAILED: build/macos/obj/bee/path_helper.obj 
g++ -MMD -MT build/macos/obj/bee/path_helper.obj -MF build/macos/obj/bee/path_helper.obj.d -std=c++17 -O2 -Wall -I3rd/lua/src -I3rd/lua-seri -I3rd/incbin -I. -Dspan_FEATURE_BYTE_SPAN=1 -DNDEBUG -fPIC -o build/macos/obj/bee/path_helper.obj -c bee/utility/path_helper.cpp
In file included from bee/utility/path_helper.cpp:1:
./bee/utility/path_helper.h:8:71: error: 'path' is unavailable: introduced in macOS 10.15
    _BEE_API auto dll_path(void* module_handle)->nonstd::expected<fs::path, std::exception>;
                                                                      ^
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/filesystem:739:24: note: 'path' has been explicitly marked unavailable here
class _LIBCPP_TYPE_VIS path {
                       ^
In file included from bee/utility/path_helper.cpp:1:
./bee/utility/path_helper.h:9:52: error: 'path' is unavailable: introduced in macOS 10.15
    _BEE_API auto exe_path()->nonstd::expected<fs::path, std::exception>;
                                                   ^
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/filesystem:739:24: note: 'path' has been explicitly marked unavailable here
class _LIBCPP_TYPE_VIS path {
                       ^
In file included from bee/utility/path_helper.cpp:1:
./bee/utility/path_helper.h:10:52: error: 'path' is unavailable: introduced in macOS 10.15
    _BEE_API auto dll_path()->nonstd::expected<fs::path, std::exception>;
                                                   ^
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/filesystem:739:24: note: 'path' has been explicitly marked unavailable here
class _LIBCPP_TYPE_VIS path {
                       ^
In file included from bee/utility/path_helper.cpp:1:
./bee/utility/path_helper.h:11:29: error: 'path' is unavailable: introduced in macOS 10.15
    _BEE_API bool equal(fs::path const& lhs, fs::path const& rhs);
                            ^
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/filesystem:739:24: note: 'path' has been explicitly marked unavailable here
class _LIBCPP_TYPE_VIS path {
                       ^
In file included from bee/utility/path_helper.cpp:1:
./bee/utility/path_helper.h:11:50: error: 'path' is unavailable: introduced in macOS 10.15
    _BEE_API bool equal(fs::path const& lhs, fs::path const& rhs);
                                                 ^
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/filesystem:739:24: note: 'path' has been explicitly marked unavailable here
class _LIBCPP_TYPE_VIS path {
                       ^
bee/utility/path_helper.cpp:51:43: error: 'path' is unavailable: introduced in macOS 10.15
    auto exe_path()->nonstd::expected<fs::path, std::exception> {
                                          ^
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/filesystem:739:24: note: 'path' has been explicitly marked unavailable here
class _LIBCPP_TYPE_VIS path {
                       ^
bee/utility/path_helper.cpp:62:20: error: 'path' is unavailable: introduced in macOS 10.15
        return fs::path(buf.data(), buf.data() + path_len - 1);
                   ^
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/filesystem:739:24: note: 'path' has been explicitly marked unavailable here
class _LIBCPP_TYPE_VIS path {
                       ^
bee/utility/path_helper.cpp:62:16: error: 'path<char *>' is unavailable: introduced in macOS 10.15
        return fs::path(buf.data(), buf.data() + path_len - 1);
               ^
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/filesystem:778:3: note: 'path<char *>' has been explicitly marked unavailable here
  path(_InputIt __first, _InputIt __last, format = format::auto_format) {
  ^
bee/utility/path_helper.cpp:62:16: error: 'path' is unavailable: introduced in macOS 10.15
        return fs::path(buf.data(), buf.data() + path_len - 1);
               ^
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/filesystem:778:3: note: 'path' has been explicitly marked unavailable here
  path(_InputIt __first, _InputIt __last, format = format::auto_format) {
  ^
bee/utility/path_helper.cpp:62:16: error: '~path' is unavailable: introduced in macOS 10.15
        return fs::path(buf.data(), buf.data() + path_len - 1);
               ^
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/filesystem:791:3: note: '~path' has been explicitly marked unavailable here
  ~path() = default;
  ^
bee/utility/path_helper.cpp:99:62: error: 'path' is unavailable: introduced in macOS 10.15
    auto dll_path(void* module_handle)->nonstd::expected<fs::path, std::exception> {
                                                             ^
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/filesystem:739:24: note: 'path' has been explicitly marked unavailable here
class _LIBCPP_TYPE_VIS path {
                       ^
bee/utility/path_helper.cpp:104:24: error: 'absolute' is unavailable: introduced in macOS 10.15
            return fs::absolute(dl_info.dli_fname).lexically_normal();
                       ^
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/filesystem:1477:39: note: 'absolute' has been explicitly marked unavailable here
inline _LIBCPP_INLINE_VISIBILITY path absolute(const path& __p) {
                                      ^
bee/utility/path_helper.cpp:104:33: error: 'path<const char *, void>' is unavailable: introduced in macOS 10.15
            return fs::absolute(dl_info.dli_fname).lexically_normal();
                                ^
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/filesystem:773:3: note: 'path<const char *, void>' has been explicitly marked unavailable here
  path(const _Source& __src, format = format::auto_format) {
  ^
bee/utility/path_helper.cpp:104:33: error: '~path' is unavailable: introduced in macOS 10.15
            return fs::absolute(dl_info.dli_fname).lexically_normal();
                                ^
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/filesystem:791:3: note: '~path' has been explicitly marked unavailable here
  ~path() = default;
  ^
bee/utility/path_helper.cpp:104:20: error: '~path' is unavailable: introduced in macOS 10.15
            return fs::absolute(dl_info.dli_fname).lexically_normal();
                   ^
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/filesystem:791:3: note: '~path' has been explicitly marked unavailable here
  ~path() = default;
  ^
bee/utility/path_helper.cpp:104:52: error: 'lexically_normal' is unavailable: introduced in macOS 10.15
            return fs::absolute(dl_info.dli_fname).lexically_normal();
                                                   ^
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/filesystem:1110:8: note: 'lexically_normal' has been explicitly marked unavailable here
  path lexically_normal() const;
       ^
bee/utility/path_helper.cpp:104:52: error: '~path' is unavailable: introduced in macOS 10.15
            return fs::absolute(dl_info.dli_fname).lexically_normal();
                                                   ^
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/filesystem:791:3: note: '~path' has been explicitly marked unavailable here
  ~path() = default;
  ^
bee/utility/path_helper.cpp:109:43: error: 'path' is unavailable: introduced in macOS 10.15
    auto dll_path()->nonstd::expected<fs::path, std::exception> {
                                          ^
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/filesystem:739:24: note: 'path' has been explicitly marked unavailable here
class _LIBCPP_TYPE_VIS path {
                       ^
bee/utility/path_helper.cpp:129:20: error: 'path' is unavailable: introduced in macOS 10.15
    bool equal(fs::path const& lhs, fs::path const& rhs) {
                   ^
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/filesystem:739:24: note: 'path' has been explicitly marked unavailable here
class _LIBCPP_TYPE_VIS path {
                       ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
[52/89] Compile CXX build/macos/obj/bee/lua_filewatch.obj
ninja: build stopped: subcommand failed.
FAILED: build/macos/_/bee 
cd 3rd/bee.lua && ninja -f ninja/macos.ninja
ninja: build stopped: subcommand failed.
The terminal process terminated with exit code: 1

Doesn't work on linux

Error from output channel:

[Error - 17:51:49] Starting client failed
Error: spawn EACCES
	at _errnoException (util.js:1024:11)
	at ChildProcess.spawn (internal/child_process.js:323:11)
	at Object.exports.spawn (child_process.js:514:9)
	at client_1.BaseLanguageClient.createMessageTransports.encoding._getServerWorkingDir.then.serverWorkingDir (/home/yan/.vscode/extensions/sumneko.lua-0.4.6/client/node_modules/vscode-languageclient/lib/main.js:354:40)
	at <anonymous>

[BUG] error being raised with `@param f fun():void`

I stumbled across this error after making some stuff in InteliJ (support was better there)
and tried to use it in vscode (where my setup is for the project)
and got a wonderful error and none of my completions where working from some files
did a quick look around and found the below to be the cause.
And as a side note, Emmy works perfectly fine in InteliJ.

The code that errors

---@param f fun():void
function t(f) end

but these work fine

---@type fun(a:string):void
local t
local r = t("Hello You")

-- NOTE: that it's `return` not `parm`
---@return fun(a: string):void
function t() end

The Error From Output Window

...xtensions\sumneko.lua-0.9.12\server\src/emmy\manager.lua:150: attempt to call a nil value (method 'getName')
stack traceback:
	...ode\extensions\sumneko.lua-0.9.12\server\src/vm\emmy.lua:161: in function 'vm.manager.doEmmyParam'
	...ode\extensions\sumneko.lua-0.9.12\server\src/vm\emmy.lua:21: in function 'vm.manager.doEmmy'
	...scode\extensions\sumneko.lua-0.9.12\server\src/vm\vm.lua:1049: in function 'vm.manager.doAction'
	...scode\extensions\sumneko.lua-0.9.12\server\src/vm\vm.lua:1092: in function 'vm.manager.doActions'
	...scode\extensions\sumneko.lua-0.9.12\server\src/vm\vm.lua:117: in function 'vm.manager.runFunction'
	...scode\extensions\sumneko.lua-0.9.12\server\src/vm\vm.lua:1111: in function 'vm.manager.callLeftFuncions'
	...scode\extensions\sumneko.lua-0.9.12\server\src/vm\vm.lua:1296: in function <...scode\extensions\sumneko.lua-0.9.12\server\src/vm\vm.lua:1283>
	[C]: in function 'xpcall'
	...scode\extensions\sumneko.lua-0.9.12\server\src/vm\vm.lua:1316: in function 'vm'
	...ode\extensions\sumneko.lua-0.9.12\server\src/service.lua:477: in method 'compileVM'
	...ode\extensions\sumneko.lua-0.9.12\server\src/service.lua:647: in function <...ode\extensions\sumneko.lua-0.9.12\server\src/service.lua:647>
	[C]: in function 'pcall'
	...ode\extensions\sumneko.lua-0.9.12\server\src/service.lua:647: in function <...ode\extensions\sumneko.lua-0.9.12\server\src/service.lua:643>

And 2 other inconveniences
missing void type and self argument to function call's is showing when using :
And a minor problem
some auto-completions are not showing from other file's and some are missing typing info
Just ask if you want another issue opened for any of these

If you need any more info just ask
and for now i'm just using the function type over fun():void.

Support for different Lua versions

I'm looking to use this for LuaJIT, but it would require to adjust the libraries for some basic functions (such as unpack, setfenv, loadstring, etc.), as well as the parser to support things like 0ULL. Is there support planned for this, or is this entirely out of scope?

I managed to adjust it locally to add some functions to it, but I would love it if you could change the language version dynamically, like with the vscode-lua extension:
image

Installation with the Archlinux Code OSS build

The VS Code build in the official repo for Archlinux is the open source one and its default user folder for extension installations is ~/.vscode-oss instead of ~/.vscode. Currently installation only works with ~/.vscode. Please make it work with ~/.vscode-oss

Currently a workaround is moving the sumneko.lua-0.10.7 folder from ~/.vscode-oss to ~/.vscode during installation and move it back afterwards.

Can't start client

[Error - 10:03:52] Starting client failed
Error: spawn UNKNOWN
	at ChildProcess.spawn (internal/child_process.js:358:11)
	at Object.spawn (child_process.js:543:9)
	at createMessageTransports._getServerWorkingDir.then.serverWorkingDir (E:\vscode-extensions\sumneko.lua-0.10.2\client\node_modules\vscode-languageclient\lib\main.js:354:40)

Language server crashes frequently

This extension stops working after some time (sometimes a few minutes, sometimes a few hours).
When it crashes, all autocompletion stops working, and error highlighting stops working too. VSCode is still responsive, but the language server seems non-responsive.

The only way to fix it is to restart VSCode. After a restart, it works fine again, for a while.

I don't know how to troubleshoot this, if you need info, let me know and I'll try to help!

ๆŠฅ้”™

(current limit is 1000) stack traceback: [C]: in function 'lpeglabel.match' ...ensions\sumneko.lua-0.10.7\server\src/parser\grammar.lua:625: in function 'parser.grammar' [C]: in function 'xpcall' ...\extensions\sumneko.lua-0.10.7\server\src/parser\ast.lua:1694: in function 'parser.ast' ...ode\extensions\sumneko.lua-0.10.7\server\src/service.lua:408: in method 'compileAst' ...ode\extensions\sumneko.lua-0.10.7\server\src/service.lua:481: in method 'compileVM' ...ode\extensions\sumneko.lua-0.10.7\server\src/service.lua:668: in function <...ode\extensions\sumneko.lua-0.10.7\server\src/service.lua:668> [C]: in function 'pcall' ...ode\extensions\sumneko.lua-0.10.7\server\src/service.lua:668: in function <...ode\extensions\sumneko.lua-0.10.7\server\src/service.lua:663>

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.